Class SubAccountApi

java.lang.Object
sendpost_java_sdk.SubAccountApi

public class SubAccountApi extends Object
  • Constructor Details

    • SubAccountApi

      public SubAccountApi()
    • SubAccountApi

      public SubAccountApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getHostIndex

      public int getHostIndex()
    • setHostIndex

      public void setHostIndex(int hostIndex)
    • getCustomBaseUrl

      public String getCustomBaseUrl()
    • setCustomBaseUrl

      public void setCustomBaseUrl(String customBaseUrl)
    • createSubAccountCall

      public okhttp3.Call createSubAccountCall(@Nonnull NewSubAccount newSubAccount, ApiCallback _callback) throws ApiException
      Build call for createSubAccount
      Parameters:
      newSubAccount - (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Response Details
      Status Code Description Response Headers
      201 Sub-account successfully created. -
      403 Forbidden, sub-account with the same name already exists. -
      401 Unauthorized, invalid API key. -
    • createSubAccount

      public SubAccount createSubAccount(@Nonnull NewSubAccount newSubAccount) throws ApiException
      Create a New Sub-Account Creates a new sub-account under the current account.
      Parameters:
      newSubAccount - (required)
      Returns:
      SubAccount
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Response Details
      Status Code Description Response Headers
      201 Sub-account successfully created. -
      403 Forbidden, sub-account with the same name already exists. -
      401 Unauthorized, invalid API key. -
    • createSubAccountWithHttpInfo

      public ApiResponse<SubAccount> createSubAccountWithHttpInfo(@Nonnull NewSubAccount newSubAccount) throws ApiException
      Create a New Sub-Account Creates a new sub-account under the current account.
      Parameters:
      newSubAccount - (required)
      Returns:
      ApiResponse<SubAccount>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Response Details
      Status Code Description Response Headers
      201 Sub-account successfully created. -
      403 Forbidden, sub-account with the same name already exists. -
      401 Unauthorized, invalid API key. -
    • createSubAccountAsync

      public okhttp3.Call createSubAccountAsync(@Nonnull NewSubAccount newSubAccount, ApiCallback<SubAccount> _callback) throws ApiException
      Create a New Sub-Account (asynchronously) Creates a new sub-account under the current account.
      Parameters:
      newSubAccount - (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Response Details
      Status Code Description Response Headers
      201 Sub-account successfully created. -
      403 Forbidden, sub-account with the same name already exists. -
      401 Unauthorized, invalid API key. -
    • deleteSubAccountCall

      public okhttp3.Call deleteSubAccountCall(@Nonnull Integer subaccountId, ApiCallback _callback) throws ApiException
      Build call for deleteSubAccount
      Parameters:
      subaccountId - The ID of the sub-account to delete. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Response Details
      Status Code Description Response Headers
      200 Sub-account successfully deleted. -
      406 Not Acceptable. Cannot delete the default sub-account. -
      401 Unauthorized. Invalid API key. -
    • deleteSubAccount

      public DeleteSubAccountResponse deleteSubAccount(@Nonnull Integer subaccountId) throws ApiException
      Delete a Specific Sub-Account Deletes a specific sub-account by its ID.
      Parameters:
      subaccountId - The ID of the sub-account to delete. (required)
      Returns:
      DeleteSubAccountResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Response Details
      Status Code Description Response Headers
      200 Sub-account successfully deleted. -
      406 Not Acceptable. Cannot delete the default sub-account. -
      401 Unauthorized. Invalid API key. -
    • deleteSubAccountWithHttpInfo

      public ApiResponse<DeleteSubAccountResponse> deleteSubAccountWithHttpInfo(@Nonnull Integer subaccountId) throws ApiException
      Delete a Specific Sub-Account Deletes a specific sub-account by its ID.
      Parameters:
      subaccountId - The ID of the sub-account to delete. (required)
      Returns:
      ApiResponse<DeleteSubAccountResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Response Details
      Status Code Description Response Headers
      200 Sub-account successfully deleted. -
      406 Not Acceptable. Cannot delete the default sub-account. -
      401 Unauthorized. Invalid API key. -
    • deleteSubAccountAsync

      public okhttp3.Call deleteSubAccountAsync(@Nonnull Integer subaccountId, ApiCallback<DeleteSubAccountResponse> _callback) throws ApiException
      Delete a Specific Sub-Account (asynchronously) Deletes a specific sub-account by its ID.
      Parameters:
      subaccountId - The ID of the sub-account to delete. (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Response Details
      Status Code Description Response Headers
      200 Sub-account successfully deleted. -
      406 Not Acceptable. Cannot delete the default sub-account. -
      401 Unauthorized. Invalid API key. -
    • getAllSubAccountsCall

      public okhttp3.Call getAllSubAccountsCall(@Nullable Integer limit, @Nullable Integer offset, @Nullable String search, ApiCallback _callback) throws ApiException
      Build call for getAllSubAccounts
      Parameters:
      limit - Number of records to return per request. (optional)
      offset - Number of initial records to skip. (optional)
      search - Case-insensitive search against the sub-account name. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Response Details
      Status Code Description Response Headers
      200 Successfully retrieved sub-accounts. -
      401 Unauthorized, invalid API key. -
    • getAllSubAccounts

      public List<SubAccount> getAllSubAccounts(@Nullable Integer limit, @Nullable Integer offset, @Nullable String search) throws ApiException
      Get All Sub-Accounts Retrieves a list of all sub-accounts associated with a specific account.
      Parameters:
      limit - Number of records to return per request. (optional)
      offset - Number of initial records to skip. (optional)
      search - Case-insensitive search against the sub-account name. (optional)
      Returns:
      List<SubAccount>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Response Details
      Status Code Description Response Headers
      200 Successfully retrieved sub-accounts. -
      401 Unauthorized, invalid API key. -
    • getAllSubAccountsWithHttpInfo

      public ApiResponse<List<SubAccount>> getAllSubAccountsWithHttpInfo(@Nullable Integer limit, @Nullable Integer offset, @Nullable String search) throws ApiException
      Get All Sub-Accounts Retrieves a list of all sub-accounts associated with a specific account.
      Parameters:
      limit - Number of records to return per request. (optional)
      offset - Number of initial records to skip. (optional)
      search - Case-insensitive search against the sub-account name. (optional)
      Returns:
      ApiResponse<List<SubAccount>>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Response Details
      Status Code Description Response Headers
      200 Successfully retrieved sub-accounts. -
      401 Unauthorized, invalid API key. -
    • getAllSubAccountsAsync

      public okhttp3.Call getAllSubAccountsAsync(@Nullable Integer limit, @Nullable Integer offset, @Nullable String search, ApiCallback<List<SubAccount>> _callback) throws ApiException
      Get All Sub-Accounts (asynchronously) Retrieves a list of all sub-accounts associated with a specific account.
      Parameters:
      limit - Number of records to return per request. (optional)
      offset - Number of initial records to skip. (optional)
      search - Case-insensitive search against the sub-account name. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Response Details
      Status Code Description Response Headers
      200 Successfully retrieved sub-accounts. -
      401 Unauthorized, invalid API key. -
    • getSubAccountCall

      public okhttp3.Call getSubAccountCall(@Nonnull Integer subaccountId, ApiCallback _callback) throws ApiException
      Build call for getSubAccount
      Parameters:
      subaccountId - The ID of the sub-account to retrieve. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Response Details
      Status Code Description Response Headers
      200 Successfully retrieved the sub-account. -
      404 Sub-account not found. -
      401 Unauthorized, invalid API key. -
    • getSubAccount

      public SubAccount getSubAccount(@Nonnull Integer subaccountId) throws ApiException
      Get a Specific Sub-Account Retrieves a specific sub-account by its ID.
      Parameters:
      subaccountId - The ID of the sub-account to retrieve. (required)
      Returns:
      SubAccount
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Response Details
      Status Code Description Response Headers
      200 Successfully retrieved the sub-account. -
      404 Sub-account not found. -
      401 Unauthorized, invalid API key. -
    • getSubAccountWithHttpInfo

      public ApiResponse<SubAccount> getSubAccountWithHttpInfo(@Nonnull Integer subaccountId) throws ApiException
      Get a Specific Sub-Account Retrieves a specific sub-account by its ID.
      Parameters:
      subaccountId - The ID of the sub-account to retrieve. (required)
      Returns:
      ApiResponse<SubAccount>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Response Details
      Status Code Description Response Headers
      200 Successfully retrieved the sub-account. -
      404 Sub-account not found. -
      401 Unauthorized, invalid API key. -
    • getSubAccountAsync

      public okhttp3.Call getSubAccountAsync(@Nonnull Integer subaccountId, ApiCallback<SubAccount> _callback) throws ApiException
      Get a Specific Sub-Account (asynchronously) Retrieves a specific sub-account by its ID.
      Parameters:
      subaccountId - The ID of the sub-account to retrieve. (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Response Details
      Status Code Description Response Headers
      200 Successfully retrieved the sub-account. -
      404 Sub-account not found. -
      401 Unauthorized, invalid API key. -
    • updateSubAccountCall

      public okhttp3.Call updateSubAccountCall(@Nonnull Integer subaccountId, @Nonnull UpdateSubAccount updateSubAccount, ApiCallback _callback) throws ApiException
      Build call for updateSubAccount
      Parameters:
      subaccountId - The ID of the sub-account to update. (required)
      updateSubAccount - (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      Http Response Details:
      Response Details
      Status Code Description Response Headers
      200 Sub-account successfully updated. -
      404 Sub-account not found. -
      401 Unauthorized, invalid API key. -
    • updateSubAccount

      public SubAccount updateSubAccount(@Nonnull Integer subaccountId, @Nonnull UpdateSubAccount updateSubAccount) throws ApiException
      Update an Existing Sub-Account Updates the details of an existing sub-account.
      Parameters:
      subaccountId - The ID of the sub-account to update. (required)
      updateSubAccount - (required)
      Returns:
      SubAccount
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Response Details
      Status Code Description Response Headers
      200 Sub-account successfully updated. -
      404 Sub-account not found. -
      401 Unauthorized, invalid API key. -
    • updateSubAccountWithHttpInfo

      public ApiResponse<SubAccount> updateSubAccountWithHttpInfo(@Nonnull Integer subaccountId, @Nonnull UpdateSubAccount updateSubAccount) throws ApiException
      Update an Existing Sub-Account Updates the details of an existing sub-account.
      Parameters:
      subaccountId - The ID of the sub-account to update. (required)
      updateSubAccount - (required)
      Returns:
      ApiResponse<SubAccount>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      Http Response Details:
      Response Details
      Status Code Description Response Headers
      200 Sub-account successfully updated. -
      404 Sub-account not found. -
      401 Unauthorized, invalid API key. -
    • updateSubAccountAsync

      public okhttp3.Call updateSubAccountAsync(@Nonnull Integer subaccountId, @Nonnull UpdateSubAccount updateSubAccount, ApiCallback<SubAccount> _callback) throws ApiException
      Update an Existing Sub-Account (asynchronously) Updates the details of an existing sub-account.
      Parameters:
      subaccountId - The ID of the sub-account to update. (required)
      updateSubAccount - (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      Http Response Details:
      Response Details
      Status Code Description Response Headers
      200 Sub-account successfully updated. -
      404 Sub-account not found. -
      401 Unauthorized, invalid API key. -