Class SuppressionApi

java.lang.Object
sendpost_java_sdk.SuppressionApi

public class SuppressionApi extends Object
  • Constructor Details

    • SuppressionApi

      public SuppressionApi()
    • SuppressionApi

      public SuppressionApi(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)
    • createSuppressionCall

      public okhttp3.Call createSuppressionCall(@Nonnull CreateSuppressionRequest createSuppressionRequest, ApiCallback _callback) throws ApiException
      Build call for createSuppression
      Parameters:
      createSuppressionRequest - (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 A list of created suppressions -
    • createSuppression

      public List<Suppression> createSuppression(@Nonnull CreateSuppressionRequest createSuppressionRequest) throws ApiException
      Create new suppressions Creates new suppressions by posting to the suppression resource. You can specify different types of suppressions including `hardBounce`, `manual`, `unsubscribe`, and `spamComplaint`.
      Parameters:
      createSuppressionRequest - (required)
      Returns:
      List<Suppression>
      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 created suppressions -
    • createSuppressionWithHttpInfo

      public ApiResponse<List<Suppression>> createSuppressionWithHttpInfo(@Nonnull CreateSuppressionRequest createSuppressionRequest) throws ApiException
      Create new suppressions Creates new suppressions by posting to the suppression resource. You can specify different types of suppressions including `hardBounce`, `manual`, `unsubscribe`, and `spamComplaint`.
      Parameters:
      createSuppressionRequest - (required)
      Returns:
      ApiResponse<List<Suppression>>
      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 created suppressions -
    • createSuppressionAsync

      public okhttp3.Call createSuppressionAsync(@Nonnull CreateSuppressionRequest createSuppressionRequest, ApiCallback<List<Suppression>> _callback) throws ApiException
      Create new suppressions (asynchronously) Creates new suppressions by posting to the suppression resource. You can specify different types of suppressions including `hardBounce`, `manual`, `unsubscribe`, and `spamComplaint`.
      Parameters:
      createSuppressionRequest - (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 A list of created suppressions -
    • deleteSuppressionCall

      public okhttp3.Call deleteSuppressionCall(@Nonnull DeleteSuppressionRequest deleteSuppressionRequest, ApiCallback _callback) throws ApiException
      Build call for deleteSuppression
      Parameters:
      deleteSuppressionRequest - (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 A message indicating successful suppression deletion -
    • deleteSuppression

      public DeleteSuppression200Response deleteSuppression(@Nonnull DeleteSuppressionRequest deleteSuppressionRequest) throws ApiException
      Delete suppressions Deletes one or more suppressions for a given sub-account. The request can contain a list of emails to delete specific suppressions or delete a single suppression.
      Parameters:
      deleteSuppressionRequest - (required)
      Returns:
      DeleteSuppression200Response
      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 message indicating successful suppression deletion -
    • deleteSuppressionWithHttpInfo

      public ApiResponse<DeleteSuppression200Response> deleteSuppressionWithHttpInfo(@Nonnull DeleteSuppressionRequest deleteSuppressionRequest) throws ApiException
      Delete suppressions Deletes one or more suppressions for a given sub-account. The request can contain a list of emails to delete specific suppressions or delete a single suppression.
      Parameters:
      deleteSuppressionRequest - (required)
      Returns:
      ApiResponse<DeleteSuppression200Response>
      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 message indicating successful suppression deletion -
    • deleteSuppressionAsync

      public okhttp3.Call deleteSuppressionAsync(@Nonnull DeleteSuppressionRequest deleteSuppressionRequest, ApiCallback<DeleteSuppression200Response> _callback) throws ApiException
      Delete suppressions (asynchronously) Deletes one or more suppressions for a given sub-account. The request can contain a list of emails to delete specific suppressions or delete a single suppression.
      Parameters:
      deleteSuppressionRequest - (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 A message indicating successful suppression deletion -
    • getSuppressionListCall

      public okhttp3.Call getSuppressionListCall(@Nonnull LocalDate from, @Nonnull LocalDate to, @Nullable Integer limit, @Nullable Integer offset, @Nullable String search, @Nullable String type, ApiCallback _callback) throws ApiException
      Build call for getSuppressionList
      Parameters:
      from - Start date for the suppression records (required)
      to - End date for the suppression records (Note: `from` should be earlier than `to` and the date range should not exceed 60 days) (required)
      limit - Number of records to return per request (optional, default to 20)
      offset - Number of initial records to skip (optional, default to 0)
      search - Case-insensitive search against suppression email (optional)
      type - Type of suppression. Valid values: `hardBounce`, `manual`, `spamComplaint`, `unsubscribe` (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 suppressions -
    • getSuppressionList

      public List<Suppression> getSuppressionList(@Nonnull LocalDate from, @Nonnull LocalDate to, @Nullable Integer limit, @Nullable Integer offset, @Nullable String search, @Nullable String type) throws ApiException
      Get all suppressions Retrieves a list of suppressions associated with a specific sub-account within a given date range. The maximum difference between `from` and `to` dates should not exceed 60 days.
      Parameters:
      from - Start date for the suppression records (required)
      to - End date for the suppression records (Note: `from` should be earlier than `to` and the date range should not exceed 60 days) (required)
      limit - Number of records to return per request (optional, default to 20)
      offset - Number of initial records to skip (optional, default to 0)
      search - Case-insensitive search against suppression email (optional)
      type - Type of suppression. Valid values: `hardBounce`, `manual`, `spamComplaint`, `unsubscribe` (optional)
      Returns:
      List<Suppression>
      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 suppressions -
    • getSuppressionListWithHttpInfo

      public ApiResponse<List<Suppression>> getSuppressionListWithHttpInfo(@Nonnull LocalDate from, @Nonnull LocalDate to, @Nullable Integer limit, @Nullable Integer offset, @Nullable String search, @Nullable String type) throws ApiException
      Get all suppressions Retrieves a list of suppressions associated with a specific sub-account within a given date range. The maximum difference between `from` and `to` dates should not exceed 60 days.
      Parameters:
      from - Start date for the suppression records (required)
      to - End date for the suppression records (Note: `from` should be earlier than `to` and the date range should not exceed 60 days) (required)
      limit - Number of records to return per request (optional, default to 20)
      offset - Number of initial records to skip (optional, default to 0)
      search - Case-insensitive search against suppression email (optional)
      type - Type of suppression. Valid values: `hardBounce`, `manual`, `spamComplaint`, `unsubscribe` (optional)
      Returns:
      ApiResponse<List<Suppression>>
      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 suppressions -
    • getSuppressionListAsync

      public okhttp3.Call getSuppressionListAsync(@Nonnull LocalDate from, @Nonnull LocalDate to, @Nullable Integer limit, @Nullable Integer offset, @Nullable String search, @Nullable String type, ApiCallback<List<Suppression>> _callback) throws ApiException
      Get all suppressions (asynchronously) Retrieves a list of suppressions associated with a specific sub-account within a given date range. The maximum difference between `from` and `to` dates should not exceed 60 days.
      Parameters:
      from - Start date for the suppression records (required)
      to - End date for the suppression records (Note: `from` should be earlier than `to` and the date range should not exceed 60 days) (required)
      limit - Number of records to return per request (optional, default to 20)
      offset - Number of initial records to skip (optional, default to 0)
      search - Case-insensitive search against suppression email (optional)
      type - Type of suppression. Valid values: `hardBounce`, `manual`, `spamComplaint`, `unsubscribe` (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 suppressions -