Class WebhookApi

java.lang.Object
sendpost_java_sdk.WebhookApi

public class WebhookApi extends Object
  • Constructor Details

    • WebhookApi

      public WebhookApi()
    • WebhookApi

      public WebhookApi(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)
    • createWebhookCall

      public okhttp3.Call createWebhookCall(@Nonnull NewWebhook newWebhook, ApiCallback _callback) throws ApiException
      Build call for createWebhook
      Parameters:
      newWebhook - (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 Webhook created successfully. -
      401 Unauthorized. Invalid API key. -
      403 Forbidden. Webhook with the same URL already exists. -
      406 Not Acceptable. Cannot create webhook for the default sub-account. -
      422 Unprocessable entity. Invalid request body. -
    • createWebhook

      public Webhook createWebhook(@Nonnull NewWebhook newWebhook) throws ApiException
      Create a New Webhook Create a new webhook by specifying its properties.
      Parameters:
      newWebhook - (required)
      Returns:
      Webhook
      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 Webhook created successfully. -
      401 Unauthorized. Invalid API key. -
      403 Forbidden. Webhook with the same URL already exists. -
      406 Not Acceptable. Cannot create webhook for the default sub-account. -
      422 Unprocessable entity. Invalid request body. -
    • createWebhookWithHttpInfo

      public ApiResponse<Webhook> createWebhookWithHttpInfo(@Nonnull NewWebhook newWebhook) throws ApiException
      Create a New Webhook Create a new webhook by specifying its properties.
      Parameters:
      newWebhook - (required)
      Returns:
      ApiResponse<Webhook>
      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 Webhook created successfully. -
      401 Unauthorized. Invalid API key. -
      403 Forbidden. Webhook with the same URL already exists. -
      406 Not Acceptable. Cannot create webhook for the default sub-account. -
      422 Unprocessable entity. Invalid request body. -
    • createWebhookAsync

      public okhttp3.Call createWebhookAsync(@Nonnull NewWebhook newWebhook, ApiCallback<Webhook> _callback) throws ApiException
      Create a New Webhook (asynchronously) Create a new webhook by specifying its properties.
      Parameters:
      newWebhook - (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 Webhook created successfully. -
      401 Unauthorized. Invalid API key. -
      403 Forbidden. Webhook with the same URL already exists. -
      406 Not Acceptable. Cannot create webhook for the default sub-account. -
      422 Unprocessable entity. Invalid request body. -
    • deleteWebhookCall

      public okhttp3.Call deleteWebhookCall(@Nonnull Integer webhookId, ApiCallback _callback) throws ApiException
      Build call for deleteWebhook
      Parameters:
      webhookId - ID of the webhook 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 Webhook deleted successfully. -
    • deleteWebhook

      public DeleteWebhookResponse deleteWebhook(@Nonnull Integer webhookId) throws ApiException
      Delete a Specific Webhook Delete a webhook by its ID.
      Parameters:
      webhookId - ID of the webhook to delete. (required)
      Returns:
      DeleteWebhookResponse
      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 Webhook deleted successfully. -
    • deleteWebhookWithHttpInfo

      public ApiResponse<DeleteWebhookResponse> deleteWebhookWithHttpInfo(@Nonnull Integer webhookId) throws ApiException
      Delete a Specific Webhook Delete a webhook by its ID.
      Parameters:
      webhookId - ID of the webhook to delete. (required)
      Returns:
      ApiResponse<DeleteWebhookResponse>
      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 Webhook deleted successfully. -
    • deleteWebhookAsync

      public okhttp3.Call deleteWebhookAsync(@Nonnull Integer webhookId, ApiCallback<DeleteWebhookResponse> _callback) throws ApiException
      Delete a Specific Webhook (asynchronously) Delete a webhook by its ID.
      Parameters:
      webhookId - ID of the webhook 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 Webhook deleted successfully. -
    • getAllWebhooksCall

      public okhttp3.Call getAllWebhooksCall(@Nullable Integer limit, @Nullable Integer offset, @Nullable String search, ApiCallback _callback) throws ApiException
      Build call for getAllWebhooks
      Parameters:
      limit - Number of records to return per request. (optional)
      offset - Number of initial records to skip. (optional)
      search - Case insensitive search against webhook URL. (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 A list of webhooks. -
    • getAllWebhooks

      public List<Webhook> getAllWebhooks(@Nullable Integer limit, @Nullable Integer offset, @Nullable String search) throws ApiException
      Get All Webhooks Retrieves a list of all webhooks, their endpoints, and the events for which they are active.
      Parameters:
      limit - Number of records to return per request. (optional)
      offset - Number of initial records to skip. (optional)
      search - Case insensitive search against webhook URL. (optional)
      Returns:
      List<Webhook>
      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 A list of webhooks. -
    • getAllWebhooksWithHttpInfo

      public ApiResponse<List<Webhook>> getAllWebhooksWithHttpInfo(@Nullable Integer limit, @Nullable Integer offset, @Nullable String search) throws ApiException
      Get All Webhooks Retrieves a list of all webhooks, their endpoints, and the events for which they are active.
      Parameters:
      limit - Number of records to return per request. (optional)
      offset - Number of initial records to skip. (optional)
      search - Case insensitive search against webhook URL. (optional)
      Returns:
      ApiResponse<List<Webhook>>
      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 A list of webhooks. -
    • getAllWebhooksAsync

      public okhttp3.Call getAllWebhooksAsync(@Nullable Integer limit, @Nullable Integer offset, @Nullable String search, ApiCallback<List<Webhook>> _callback) throws ApiException
      Get All Webhooks (asynchronously) Retrieves a list of all webhooks, their endpoints, and the events for which they are active.
      Parameters:
      limit - Number of records to return per request. (optional)
      offset - Number of initial records to skip. (optional)
      search - Case insensitive search against webhook URL. (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 A list of webhooks. -
    • getWebhookCall

      public okhttp3.Call getWebhookCall(@Nonnull Integer webhookId, ApiCallback _callback) throws ApiException
      Build call for getWebhook
      Parameters:
      webhookId - The ID of the webhook 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 Webhook details. -
    • getWebhook

      public Webhook getWebhook(@Nonnull Integer webhookId) throws ApiException
      Get a Specific Webhook Retrieves a specific webhook based on its ID.
      Parameters:
      webhookId - The ID of the webhook to retrieve. (required)
      Returns:
      Webhook
      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 Webhook details. -
    • getWebhookWithHttpInfo

      public ApiResponse<Webhook> getWebhookWithHttpInfo(@Nonnull Integer webhookId) throws ApiException
      Get a Specific Webhook Retrieves a specific webhook based on its ID.
      Parameters:
      webhookId - The ID of the webhook to retrieve. (required)
      Returns:
      ApiResponse<Webhook>
      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 Webhook details. -
    • getWebhookAsync

      public okhttp3.Call getWebhookAsync(@Nonnull Integer webhookId, ApiCallback<Webhook> _callback) throws ApiException
      Get a Specific Webhook (asynchronously) Retrieves a specific webhook based on its ID.
      Parameters:
      webhookId - The ID of the webhook 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 Webhook details. -
    • updateWebhookCall

      public okhttp3.Call updateWebhookCall(@Nonnull Integer webhookId, @Nonnull UpdateWebhook updateWebhook, ApiCallback _callback) throws ApiException
      Build call for updateWebhook
      Parameters:
      webhookId - ID of the webhook to update. (required)
      updateWebhook - (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 Webhook updated successfully. -
    • updateWebhook

      public Webhook updateWebhook(@Nonnull Integer webhookId, @Nonnull UpdateWebhook updateWebhook) throws ApiException
      Update an Existing Webhook Update the properties of an existing webhook.
      Parameters:
      webhookId - ID of the webhook to update. (required)
      updateWebhook - (required)
      Returns:
      Webhook
      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 Webhook updated successfully. -
    • updateWebhookWithHttpInfo

      public ApiResponse<Webhook> updateWebhookWithHttpInfo(@Nonnull Integer webhookId, @Nonnull UpdateWebhook updateWebhook) throws ApiException
      Update an Existing Webhook Update the properties of an existing webhook.
      Parameters:
      webhookId - ID of the webhook to update. (required)
      updateWebhook - (required)
      Returns:
      ApiResponse<Webhook>
      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 Webhook updated successfully. -
    • updateWebhookAsync

      public okhttp3.Call updateWebhookAsync(@Nonnull Integer webhookId, @Nonnull UpdateWebhook updateWebhook, ApiCallback<Webhook> _callback) throws ApiException
      Update an Existing Webhook (asynchronously) Update the properties of an existing webhook.
      Parameters:
      webhookId - ID of the webhook to update. (required)
      updateWebhook - (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 Webhook updated successfully. -