Skip to content
This repository was archived by the owner on Jan 12, 2021. It is now read-only.

Latest commit

 

History

History
252 lines (173 loc) · 8.53 KB

File metadata and controls

252 lines (173 loc) · 8.53 KB

SubOrganizationsApi

All URIs are relative to http://localhost/

Method HTTP request Description
create POST api/v2/sub_organizations.json_api Create a(n) Sub Organization
delete DELETE api/v2/sub_organizations/{id}.json_api Delete a(n) Sub Organization
list PUT api/v2/sub_organizations.json_api Get a list of Sub Organizations
show GET api/v2/sub_organizations/{id}.json_api Show a single Sub Organization
update PATCH api/v2/sub_organizations/{id}.json_api Update a(n) Sub Organization

create

SubOrganization create(name, organizationId, include)

Create a(n) Sub Organization

Example

// Import classes:
//import io.evident.EspSdk.ApiException;
//import io.evident.api.SubOrganizationsApi;


SubOrganizationsApi apiInstance = new SubOrganizationsApi();
String name = "name_example"; // String | Name of the sub organization
Integer organizationId = 56; // Integer | The ID of the organization this sub organization should belong to
String include = "include_example"; // String | Related objects that can be included in the response:  external_accounts, organization, teams See Including Objects for more information.
try {
    SubOrganization result = apiInstance.create(name, organizationId, include);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling SubOrganizationsApi#create");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
name String Name of the sub organization
organizationId Integer The ID of the organization this sub organization should belong to
include String Related objects that can be included in the response: external_accounts, organization, teams See Including Objects for more information. [optional]

Return type

SubOrganization

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

delete

Meta delete(id)

Delete a(n) Sub Organization

Example

// Import classes:
//import io.evident.EspSdk.ApiException;
//import io.evident.api.SubOrganizationsApi;


SubOrganizationsApi apiInstance = new SubOrganizationsApi();
Integer id = 56; // Integer | Sub Organization ID
try {
    Meta result = apiInstance.delete(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling SubOrganizationsApi#delete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Integer Sub Organization ID

Return type

Meta

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

list

PaginatedCollection list(include, filter, page)

Get a list of Sub Organizations

Example

// Import classes:
//import io.evident.EspSdk.ApiException;
//import io.evident.api.SubOrganizationsApi;


SubOrganizationsApi apiInstance = new SubOrganizationsApi();
String include = "include_example"; // String | Related objects that can be included in the response:  external_accounts, organization, teams See Including Objects for more information.
Map<String, String> filter = new HashMap(); // Map<String, String> | Filter Params for Searching.  Equality Searchable Attributes: [id, name] Matching Searchable Attribute: [name]  Sortable Attributes: [name, updated_at, created_at, id] Searchable Association: [organization] See Searching Lists for more information. See the filter parameter of the association's list action to see what attributes are searchable on each association. See Conditions on Relationships in Searching Lists for more information.
String page = "{:number=>1,+:size=>20}"; // String | Page Number and Page Size.  Number is the page number of the collection to return, size is the number of items to return per page.
try {
    PaginatedCollection result = apiInstance.list(include, filter, page);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling SubOrganizationsApi#list");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
include String Related objects that can be included in the response: external_accounts, organization, teams See Including Objects for more information. [optional]
filter Map<String, String> Filter Params for Searching. Equality Searchable Attributes: [id, name] Matching Searchable Attribute: [name] Sortable Attributes: [name, updated_at, created_at, id] Searchable Association: [organization] See Searching Lists for more information. See the filter parameter of the association's list action to see what attributes are searchable on each association. See Conditions on Relationships in Searching Lists for more information. [optional]
page String Page Number and Page Size. Number is the page number of the collection to return, size is the number of items to return per page. [optional] [default to {:number=>1,+:size=>20}]

Return type

PaginatedCollection

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

show

SubOrganization show(id, include)

Show a single Sub Organization

Example

// Import classes:
//import io.evident.EspSdk.ApiException;
//import io.evident.api.SubOrganizationsApi;


SubOrganizationsApi apiInstance = new SubOrganizationsApi();
Integer id = 56; // Integer | Sub Organization ID
String include = "include_example"; // String | Related objects that can be included in the response:  external_accounts, organization, teams See Including Objects for more information.
try {
    SubOrganization result = apiInstance.show(id, include);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling SubOrganizationsApi#show");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Integer Sub Organization ID
include String Related objects that can be included in the response: external_accounts, organization, teams See Including Objects for more information. [optional]

Return type

SubOrganization

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

update

SubOrganization update(id, include, name)

Update a(n) Sub Organization

Example

// Import classes:
//import io.evident.EspSdk.ApiException;
//import io.evident.api.SubOrganizationsApi;


SubOrganizationsApi apiInstance = new SubOrganizationsApi();
Integer id = 56; // Integer | Sub Organization ID
String include = "include_example"; // String | Related objects that can be included in the response:  external_accounts, organization, teams See Including Objects for more information.
String name = "name_example"; // String | Name of the sub organization
try {
    SubOrganization result = apiInstance.update(id, include, name);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling SubOrganizationsApi#update");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Integer Sub Organization ID
include String Related objects that can be included in the response: external_accounts, organization, teams See Including Objects for more information. [optional]
name String Name of the sub organization [optional]

Return type

SubOrganization

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json