Class WhatsAppCampaignsApi

java.lang.Object
software.xdev.brevo.client.BaseApi
software.xdev.brevo.api.WhatsAppCampaignsApi

public class WhatsAppCampaignsApi extends BaseApi
  • Constructor Details

    • WhatsAppCampaignsApi

      public WhatsAppCampaignsApi()
    • WhatsAppCampaignsApi

      public WhatsAppCampaignsApi(ApiClient apiClient)
  • Method Details

    • createWhatsAppCampaign

      public CreateModel createWhatsAppCampaign(@Nonnull CreateWhatsAppCampaign createWhatsAppCampaign) throws ApiException
      Create and Send a WhatsApp campaign
      Parameters:
      createWhatsAppCampaign - Values to create a WhatsApp Campaign (required)
      Returns:
      CreateModel
      Throws:
      ApiException - if fails to make API call
    • createWhatsAppCampaign

      public CreateModel createWhatsAppCampaign(@Nonnull CreateWhatsAppCampaign createWhatsAppCampaign, Map<String,String> additionalHeaders) throws ApiException
      Create and Send a WhatsApp campaign
      Parameters:
      createWhatsAppCampaign - Values to create a WhatsApp Campaign (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      CreateModel
      Throws:
      ApiException - if fails to make API call
    • createWhatsAppTemplate

      public CreateModel createWhatsAppTemplate(@Nonnull CreateWhatsAppTemplate createWhatsAppTemplate) throws ApiException
      Create a WhatsApp template
      Parameters:
      createWhatsAppTemplate - Values to create a WhatsApp template (required)
      Returns:
      CreateModel
      Throws:
      ApiException - if fails to make API call
    • createWhatsAppTemplate

      public CreateModel createWhatsAppTemplate(@Nonnull CreateWhatsAppTemplate createWhatsAppTemplate, Map<String,String> additionalHeaders) throws ApiException
      Create a WhatsApp template
      Parameters:
      createWhatsAppTemplate - Values to create a WhatsApp template (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      CreateModel
      Throws:
      ApiException - if fails to make API call
    • deleteWhatsAppCampaign

      public void deleteWhatsAppCampaign(@Nonnull Long campaignId) throws ApiException
      Delete a WhatsApp campaign
      Parameters:
      campaignId - id of the campaign (required)
      Throws:
      ApiException - if fails to make API call
    • deleteWhatsAppCampaign

      public void deleteWhatsAppCampaign(@Nonnull Long campaignId, Map<String,String> additionalHeaders) throws ApiException
      Delete a WhatsApp campaign
      Parameters:
      campaignId - id of the campaign (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getWhatsAppCampaign

      public GetWhatsappCampaignOverview getWhatsAppCampaign(@Nonnull Long campaignId) throws ApiException
      Get a WhatsApp campaign
      Parameters:
      campaignId - Id of the campaign (required)
      Returns:
      GetWhatsappCampaignOverview
      Throws:
      ApiException - if fails to make API call
    • getWhatsAppCampaign

      public GetWhatsappCampaignOverview getWhatsAppCampaign(@Nonnull Long campaignId, Map<String,String> additionalHeaders) throws ApiException
      Get a WhatsApp campaign
      Parameters:
      campaignId - Id of the campaign (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GetWhatsappCampaignOverview
      Throws:
      ApiException - if fails to make API call
    • getWhatsAppCampaigns

      public GetWhatsappCampaigns getWhatsAppCampaigns(@Nullable String startDate, @Nullable String endDate, @Nullable Long limit, @Nullable Long offset, @Nullable String sort) throws ApiException
      Return all your created WhatsApp campaigns
      Parameters:
      startDate - **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp campaigns created. **Prefer to pass your timezone in date-time format for accurate result** (optional)
      endDate - **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp campaigns created. **Prefer to pass your timezone in date-time format for accurate result** (optional)
      limit - Number of documents per page (optional, default to 50)
      offset - Index of the first document in the page (optional, default to 0)
      sort - Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed (optional, default to desc)
      Returns:
      GetWhatsappCampaigns
      Throws:
      ApiException - if fails to make API call
    • getWhatsAppCampaigns

      public GetWhatsappCampaigns getWhatsAppCampaigns(@Nullable String startDate, @Nullable String endDate, @Nullable Long limit, @Nullable Long offset, @Nullable String sort, Map<String,String> additionalHeaders) throws ApiException
      Return all your created WhatsApp campaigns
      Parameters:
      startDate - **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp campaigns created. **Prefer to pass your timezone in date-time format for accurate result** (optional)
      endDate - **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp campaigns created. **Prefer to pass your timezone in date-time format for accurate result** (optional)
      limit - Number of documents per page (optional, default to 50)
      offset - Index of the first document in the page (optional, default to 0)
      sort - Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed (optional, default to desc)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GetWhatsappCampaigns
      Throws:
      ApiException - if fails to make API call
    • getWhatsAppConfig

      public GetWhatsAppConfig getWhatsAppConfig() throws ApiException
      Get your WhatsApp API account information
      Returns:
      GetWhatsAppConfig
      Throws:
      ApiException - if fails to make API call
    • getWhatsAppConfig

      public GetWhatsAppConfig getWhatsAppConfig(Map<String,String> additionalHeaders) throws ApiException
      Get your WhatsApp API account information
      Parameters:
      additionalHeaders - additionalHeaders for this call
      Returns:
      GetWhatsAppConfig
      Throws:
      ApiException - if fails to make API call
    • getWhatsAppTemplates

      public GetWhatsappTemplates getWhatsAppTemplates(@Nullable String startDate, @Nullable String endDate, @Nullable Long limit, @Nullable Long offset, @Nullable String sort, @Nullable String source) throws ApiException
      Return all your created WhatsApp templates
      Parameters:
      startDate - **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result** (optional)
      endDate - **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result** (optional)
      limit - Number of documents per page (optional, default to 50)
      offset - Index of the first document in the page (optional, default to 0)
      sort - Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed (optional, default to desc)
      source - source of the template (optional)
      Returns:
      GetWhatsappTemplates
      Throws:
      ApiException - if fails to make API call
    • getWhatsAppTemplates

      public GetWhatsappTemplates getWhatsAppTemplates(@Nullable String startDate, @Nullable String endDate, @Nullable Long limit, @Nullable Long offset, @Nullable String sort, @Nullable String source, Map<String,String> additionalHeaders) throws ApiException
      Return all your created WhatsApp templates
      Parameters:
      startDate - **Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result** (optional)
      endDate - **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result** (optional)
      limit - Number of documents per page (optional, default to 50)
      offset - Index of the first document in the page (optional, default to 0)
      sort - Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed (optional, default to desc)
      source - source of the template (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GetWhatsappTemplates
      Throws:
      ApiException - if fails to make API call
    • sendWhatsAppTemplateApproval

      public void sendWhatsAppTemplateApproval(@Nonnull Long templateId) throws ApiException
      Send your WhatsApp template for approval
      Parameters:
      templateId - id of the template (required)
      Throws:
      ApiException - if fails to make API call
    • sendWhatsAppTemplateApproval

      public void sendWhatsAppTemplateApproval(@Nonnull Long templateId, Map<String,String> additionalHeaders) throws ApiException
      Send your WhatsApp template for approval
      Parameters:
      templateId - id of the template (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • updateWhatsAppCampaign

      public void updateWhatsAppCampaign(@Nonnull Long campaignId, @Nonnull UpdateWhatsAppCampaign updateWhatsAppCampaign) throws ApiException
      Update a WhatsApp campaign
      Parameters:
      campaignId - id of the campaign (required)
      updateWhatsAppCampaign - Values to update a WhatsApp Campaign (required)
      Throws:
      ApiException - if fails to make API call
    • updateWhatsAppCampaign

      public void updateWhatsAppCampaign(@Nonnull Long campaignId, @Nonnull UpdateWhatsAppCampaign updateWhatsAppCampaign, Map<String,String> additionalHeaders) throws ApiException
      Update a WhatsApp campaign
      Parameters:
      campaignId - id of the campaign (required)
      updateWhatsAppCampaign - Values to update a WhatsApp Campaign (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • invokeAPI

      public <T> T invokeAPI(String url, String method, Object request, com.fasterxml.jackson.core.type.TypeReference<T> returnType, Map<String,String> additionalHeaders) throws ApiException
      Description copied from class: BaseApi
      Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.
      Specified by:
      invokeAPI in class BaseApi
      Parameters:
      url - The URL for the request, either full URL or only the path.
      method - The HTTP method for the request.
      request - The request object.
      returnType - The return type.
      additionalHeaders - Additional headers for the request.
      Returns:
      The API response in the specified type.
      Throws:
      ApiException - if fails to make API call.