Package software.xdev.brevo.api
Class SmsCampaignsApi
java.lang.Object
software.xdev.brevo.client.BaseApi
software.xdev.brevo.api.SmsCampaignsApi
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSmsCampaign(CreateSmsCampaign createSmsCampaign) Creates an SMS campaigncreateSmsCampaign(CreateSmsCampaign createSmsCampaign, Map<String, String> additionalHeaders) Creates an SMS campaignvoiddeleteSmsCampaign(Long campaignId) Delete an SMS campaignvoiddeleteSmsCampaign(Long campaignId, Map<String, String> additionalHeaders) Delete an SMS campaigngetSmsCampaign(Long campaignId) Get an SMS campaigngetSmsCampaign(Long campaignId, Map<String, String> additionalHeaders) Get an SMS campaigngetSmsCampaigns(String status, String startDate, String endDate, Long limit, Long offset, String sort) Returns the information for all your created SMS campaignsgetSmsCampaigns(String status, String startDate, String endDate, Long limit, Long offset, String sort, Map<String, String> additionalHeaders) Returns the information for all your created SMS campaigns<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.requestSmsRecipientExport(Long campaignId, RequestSmsRecipientExport recipientExport) Export an SMS campaign's recipients It returns the background process ID which on completion calls the notify URL that you have set in the input.requestSmsRecipientExport(Long campaignId, RequestSmsRecipientExport recipientExport, Map<String, String> additionalHeaders) Export an SMS campaign's recipients It returns the background process ID which on completion calls the notify URL that you have set in the input.voidsendSmsCampaignNow(Long campaignId) Send your SMS campaign immediatelyvoidsendSmsCampaignNow(Long campaignId, Map<String, String> additionalHeaders) Send your SMS campaign immediatelyvoidsendSmsReport(Long campaignId, SendReport sendReport) Send an SMS campaign's report Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail.voidsendSmsReport(Long campaignId, SendReport sendReport, Map<String, String> additionalHeaders) Send an SMS campaign's report Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail.voidsendTestSms(Long campaignId, SendTestSms sendTestSms) Send a test SMS campaignvoidsendTestSms(Long campaignId, SendTestSms sendTestSms, Map<String, String> additionalHeaders) Send a test SMS campaignvoidupdateSmsCampaign(Long campaignId, UpdateSmsCampaign updateSmsCampaign) Update an SMS campaignvoidupdateSmsCampaign(Long campaignId, UpdateSmsCampaign updateSmsCampaign, Map<String, String> additionalHeaders) Update an SMS campaignvoidupdateSmsCampaignStatus(Long campaignId, UpdateCampaignStatus status) Update a campaign's statusvoidupdateSmsCampaignStatus(Long campaignId, UpdateCampaignStatus status, Map<String, String> additionalHeaders) Update a campaign's statusMethods inherited from class software.xdev.brevo.client.BaseApi
getApiClient, invokeAPI, invokeAPI, invokeAPI, invokeAPI, invokeAPI, invokeAPI, setApiClient
-
Constructor Details
-
SmsCampaignsApi
public SmsCampaignsApi() -
SmsCampaignsApi
-
-
Method Details
-
createSmsCampaign
public CreateModel createSmsCampaign(@Nonnull CreateSmsCampaign createSmsCampaign) throws ApiException Creates an SMS campaign- Parameters:
createSmsCampaign- Values to create an SMS Campaign (required)- Returns:
- CreateModel
- Throws:
ApiException- if fails to make API call
-
createSmsCampaign
public CreateModel createSmsCampaign(@Nonnull CreateSmsCampaign createSmsCampaign, Map<String, String> additionalHeaders) throws ApiExceptionCreates an SMS campaign- Parameters:
createSmsCampaign- Values to create an SMS Campaign (required)additionalHeaders- additionalHeaders for this call- Returns:
- CreateModel
- Throws:
ApiException- if fails to make API call
-
deleteSmsCampaign
Delete an SMS campaign- Parameters:
campaignId- id of the SMS campaign (required)- Throws:
ApiException- if fails to make API call
-
deleteSmsCampaign
public void deleteSmsCampaign(@Nonnull Long campaignId, Map<String, String> additionalHeaders) throws ApiExceptionDelete an SMS campaign- Parameters:
campaignId- id of the SMS campaign (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
getSmsCampaign
Get an SMS campaign- Parameters:
campaignId- id of the SMS campaign (required)- Returns:
- GetSmsCampaign
- Throws:
ApiException- if fails to make API call
-
getSmsCampaign
public GetSmsCampaign getSmsCampaign(@Nonnull Long campaignId, Map<String, String> additionalHeaders) throws ApiExceptionGet an SMS campaign- Parameters:
campaignId- id of the SMS campaign (required)additionalHeaders- additionalHeaders for this call- Returns:
- GetSmsCampaign
- Throws:
ApiException- if fails to make API call
-
getSmsCampaigns
public GetSmsCampaigns getSmsCampaigns(@Nullable String status, @Nullable String startDate, @Nullable String endDate, @Nullable Long limit, @Nullable Long offset, @Nullable String sort) throws ApiException Returns the information for all your created SMS campaigns- Parameters:
status- Status of campaign. (optional)startDate- **Mandatory if endDate is used.** Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional)endDate- **Mandatory if startDate is used.** Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional)limit- Number limitation for the result returned (optional, default to 500)offset- Beginning point in the list to retrieve from. (optional, default to 0)sort- Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc)- Returns:
- GetSmsCampaigns
- Throws:
ApiException- if fails to make API call
-
getSmsCampaigns
public GetSmsCampaigns getSmsCampaigns(@Nullable String status, @Nullable String startDate, @Nullable String endDate, @Nullable Long limit, @Nullable Long offset, @Nullable String sort, Map<String, String> additionalHeaders) throws ApiExceptionReturns the information for all your created SMS campaigns- Parameters:
status- Status of campaign. (optional)startDate- **Mandatory if endDate is used.** Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional)endDate- **Mandatory if startDate is used.** Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional)limit- Number limitation for the result returned (optional, default to 500)offset- Beginning point in the list to retrieve from. (optional, default to 0)sort- Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc)additionalHeaders- additionalHeaders for this call- Returns:
- GetSmsCampaigns
- Throws:
ApiException- if fails to make API call
-
requestSmsRecipientExport
public CreatedProcessId requestSmsRecipientExport(@Nonnull Long campaignId, @Nullable RequestSmsRecipientExport recipientExport) throws ApiException Export an SMS campaign's recipients It returns the background process ID which on completion calls the notify URL that you have set in the input.- Parameters:
campaignId- id of the campaign (required)recipientExport- Values to send for a recipient export request (optional)- Returns:
- CreatedProcessId
- Throws:
ApiException- if fails to make API call
-
requestSmsRecipientExport
public CreatedProcessId requestSmsRecipientExport(@Nonnull Long campaignId, @Nullable RequestSmsRecipientExport recipientExport, Map<String, String> additionalHeaders) throws ApiExceptionExport an SMS campaign's recipients It returns the background process ID which on completion calls the notify URL that you have set in the input.- Parameters:
campaignId- id of the campaign (required)recipientExport- Values to send for a recipient export request (optional)additionalHeaders- additionalHeaders for this call- Returns:
- CreatedProcessId
- Throws:
ApiException- if fails to make API call
-
sendSmsCampaignNow
Send your SMS campaign immediately- Parameters:
campaignId- id of the campaign (required)- Throws:
ApiException- if fails to make API call
-
sendSmsCampaignNow
public void sendSmsCampaignNow(@Nonnull Long campaignId, Map<String, String> additionalHeaders) throws ApiExceptionSend your SMS campaign immediately- Parameters:
campaignId- id of the campaign (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
sendSmsReport
public void sendSmsReport(@Nonnull Long campaignId, @Nonnull SendReport sendReport) throws ApiException Send an SMS campaign's report Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail.- Parameters:
campaignId- id of the campaign (required)sendReport- Values for send a report (required)- Throws:
ApiException- if fails to make API call
-
sendSmsReport
public void sendSmsReport(@Nonnull Long campaignId, @Nonnull SendReport sendReport, Map<String, String> additionalHeaders) throws ApiExceptionSend an SMS campaign's report Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail.- Parameters:
campaignId- id of the campaign (required)sendReport- Values for send a report (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
sendTestSms
public void sendTestSms(@Nonnull Long campaignId, @Nonnull SendTestSms sendTestSms) throws ApiException Send a test SMS campaign- Parameters:
campaignId- Id of the SMS campaign (required)sendTestSms- Mobile number of the recipient with the country code. This number **must belong to one of your contacts in Brevo account and must not be blacklisted** (required)- Throws:
ApiException- if fails to make API call
-
sendTestSms
public void sendTestSms(@Nonnull Long campaignId, @Nonnull SendTestSms sendTestSms, Map<String, String> additionalHeaders) throws ApiExceptionSend a test SMS campaign- Parameters:
campaignId- Id of the SMS campaign (required)sendTestSms- Mobile number of the recipient with the country code. This number **must belong to one of your contacts in Brevo account and must not be blacklisted** (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
updateSmsCampaign
public void updateSmsCampaign(@Nonnull Long campaignId, @Nonnull UpdateSmsCampaign updateSmsCampaign) throws ApiException Update an SMS campaign- Parameters:
campaignId- id of the SMS campaign (required)updateSmsCampaign- Values to update an SMS Campaign (required)- Throws:
ApiException- if fails to make API call
-
updateSmsCampaign
public void updateSmsCampaign(@Nonnull Long campaignId, @Nonnull UpdateSmsCampaign updateSmsCampaign, Map<String, String> additionalHeaders) throws ApiExceptionUpdate an SMS campaign- Parameters:
campaignId- id of the SMS campaign (required)updateSmsCampaign- Values to update an SMS Campaign (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
updateSmsCampaignStatus
public void updateSmsCampaignStatus(@Nonnull Long campaignId, @Nonnull UpdateCampaignStatus status) throws ApiException Update a campaign's status- Parameters:
campaignId- id of the campaign (required)status- Status of the campaign. (required)- Throws:
ApiException- if fails to make API call
-
updateSmsCampaignStatus
public void updateSmsCampaignStatus(@Nonnull Long campaignId, @Nonnull UpdateCampaignStatus status, Map<String, String> additionalHeaders) throws ApiExceptionUpdate a campaign's status- Parameters:
campaignId- id of the campaign (required)status- Status of the 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.
-