Package software.xdev.brevo.api
Class WhatsAppCampaignsApi
java.lang.Object
software.xdev.brevo.client.BaseApi
software.xdev.brevo.api.WhatsAppCampaignsApi
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateWhatsAppCampaign(CreateWhatsAppCampaign createWhatsAppCampaign) Create and Send a WhatsApp campaigncreateWhatsAppCampaign(CreateWhatsAppCampaign createWhatsAppCampaign, Map<String, String> additionalHeaders) Create and Send a WhatsApp campaigncreateWhatsAppTemplate(CreateWhatsAppTemplate createWhatsAppTemplate) Create a WhatsApp templatecreateWhatsAppTemplate(CreateWhatsAppTemplate createWhatsAppTemplate, Map<String, String> additionalHeaders) Create a WhatsApp templatevoiddeleteWhatsAppCampaign(Long campaignId) Delete a WhatsApp campaignvoiddeleteWhatsAppCampaign(Long campaignId, Map<String, String> additionalHeaders) Delete a WhatsApp campaigngetWhatsAppCampaign(Long campaignId) Get a WhatsApp campaigngetWhatsAppCampaign(Long campaignId, Map<String, String> additionalHeaders) Get a WhatsApp campaignReturn all your created WhatsApp campaignsgetWhatsAppCampaigns(String startDate, String endDate, Long limit, Long offset, String sort, Map<String, String> additionalHeaders) Return all your created WhatsApp campaignsGet your WhatsApp API account informationgetWhatsAppConfig(Map<String, String> additionalHeaders) Get your WhatsApp API account informationgetWhatsAppTemplates(String startDate, String endDate, Long limit, Long offset, String sort, String source) Return all your created WhatsApp templatesgetWhatsAppTemplates(String startDate, String endDate, Long limit, Long offset, String sort, String source, Map<String, String> additionalHeaders) Return all your created WhatsApp templates<T> TinvokeAPI(String url, String method, Object request, com.fasterxml.jackson.core.type.TypeReference<T> returnType, Map<String, String> additionalHeaders) Directly invoke the API for the given URL.voidsendWhatsAppTemplateApproval(Long templateId) Send your WhatsApp template for approvalvoidsendWhatsAppTemplateApproval(Long templateId, Map<String, String> additionalHeaders) Send your WhatsApp template for approvalvoidupdateWhatsAppCampaign(Long campaignId, UpdateWhatsAppCampaign updateWhatsAppCampaign) Update a WhatsApp campaignvoidupdateWhatsAppCampaign(Long campaignId, UpdateWhatsAppCampaign updateWhatsAppCampaign, Map<String, String> additionalHeaders) Update a WhatsApp campaignMethods inherited from class software.xdev.brevo.client.BaseApi
getApiClient, invokeAPI, invokeAPI, invokeAPI, invokeAPI, invokeAPI, invokeAPI, setApiClient
-
Constructor Details
-
WhatsAppCampaignsApi
public WhatsAppCampaignsApi() -
WhatsAppCampaignsApi
-
-
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 ApiExceptionCreate 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 ApiExceptionCreate 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
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 ApiExceptionDelete 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 ApiExceptionGet 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 ApiExceptionReturn 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
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 ApiExceptionGet 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 ApiExceptionReturn 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
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 ApiExceptionSend 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 ApiExceptionUpdate 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 ApiExceptionDescription copied from class:BaseApiDirectly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.- Specified by:
invokeAPIin classBaseApi- 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.
-