Package software.xdev.brevo.api
Class TransactionalSmsApi
java.lang.Object
software.xdev.brevo.client.BaseApi
software.xdev.brevo.api.TransactionalSmsApi
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetSmsEvents(Long limit, String startDate, String endDate, Long offset, Long days, String phoneNumber, String event, String tags, String sort) Get all your SMS activity (unaggregated events)getSmsEvents(Long limit, String startDate, String endDate, Long offset, Long days, String phoneNumber, String event, String tags, String sort, Map<String, String> additionalHeaders) Get all your SMS activity (unaggregated events)getTransacAggregatedSmsReport(String startDate, String endDate, Long days, String tag) Get your SMS activity aggregated over a period of timegetTransacAggregatedSmsReport(String startDate, String endDate, Long days, String tag, Map<String, String> additionalHeaders) Get your SMS activity aggregated over a period of timeGet your SMS activity aggregated per daygetTransacSmsReport(String startDate, String endDate, Long days, String tag, String sort, Map<String, String> additionalHeaders) Get your SMS activity aggregated per day<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.sendAsyncTransactionalSms(SendTransacSms sendTransacSms) Send SMS message asynchronously to a mobile numbersendAsyncTransactionalSms(SendTransacSms sendTransacSms, Map<String, String> additionalHeaders) Send SMS message asynchronously to a mobile numbersendTransacSms(SendTransacSms sendTransacSms) Send SMS message to a mobile numbersendTransacSms(SendTransacSms sendTransacSms, Map<String, String> additionalHeaders) Send SMS message to a mobile numberMethods inherited from class software.xdev.brevo.client.BaseApi
getApiClient, invokeAPI, invokeAPI, invokeAPI, invokeAPI, invokeAPI, invokeAPI, setApiClient
-
Constructor Details
-
TransactionalSmsApi
public TransactionalSmsApi() -
TransactionalSmsApi
-
-
Method Details
-
getSmsEvents
public GetSmsEventReport getSmsEvents(@Nullable Long limit, @Nullable String startDate, @Nullable String endDate, @Nullable Long offset, @Nullable Long days, @Nullable String phoneNumber, @Nullable String event, @Nullable String tags, @Nullable String sort) throws ApiException Get all your SMS activity (unaggregated events)- Parameters:
limit- Number of documents per page (optional, default to 50)startDate- **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the report (optional)endDate- **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the report (optional)offset- Index of the first document of the page (optional, default to 0)days- Number of days in the past including today (positive integer). **Not compatible with 'startDate' and 'endDate'** (optional)phoneNumber- Filter the report for a specific phone number (optional)event- Filter the report for specific events (optional)tags- Filter the report for specific tags passed as a serialized urlencoded array (optional)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:
- GetSmsEventReport
- Throws:
ApiException- if fails to make API call
-
getSmsEvents
public GetSmsEventReport getSmsEvents(@Nullable Long limit, @Nullable String startDate, @Nullable String endDate, @Nullable Long offset, @Nullable Long days, @Nullable String phoneNumber, @Nullable String event, @Nullable String tags, @Nullable String sort, Map<String, String> additionalHeaders) throws ApiExceptionGet all your SMS activity (unaggregated events)- Parameters:
limit- Number of documents per page (optional, default to 50)startDate- **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the report (optional)endDate- **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the report (optional)offset- Index of the first document of the page (optional, default to 0)days- Number of days in the past including today (positive integer). **Not compatible with 'startDate' and 'endDate'** (optional)phoneNumber- Filter the report for a specific phone number (optional)event- Filter the report for specific events (optional)tags- Filter the report for specific tags passed as a serialized urlencoded array (optional)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:
- GetSmsEventReport
- Throws:
ApiException- if fails to make API call
-
getTransacAggregatedSmsReport
public GetTransacAggregatedSmsReport getTransacAggregatedSmsReport(@Nullable String startDate, @Nullable String endDate, @Nullable Long days, @Nullable String tag) throws ApiException Get your SMS activity aggregated over a period of time- Parameters:
startDate- **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the report (optional)endDate- **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the report (optional)days- Number of days in the past including today (positive integer). **Not compatible with startDate and endDate** (optional)tag- Filter on a tag (optional)- Returns:
- GetTransacAggregatedSmsReport
- Throws:
ApiException- if fails to make API call
-
getTransacAggregatedSmsReport
public GetTransacAggregatedSmsReport getTransacAggregatedSmsReport(@Nullable String startDate, @Nullable String endDate, @Nullable Long days, @Nullable String tag, Map<String, String> additionalHeaders) throws ApiExceptionGet your SMS activity aggregated over a period of time- Parameters:
startDate- **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the report (optional)endDate- **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the report (optional)days- Number of days in the past including today (positive integer). **Not compatible with startDate and endDate** (optional)tag- Filter on a tag (optional)additionalHeaders- additionalHeaders for this call- Returns:
- GetTransacAggregatedSmsReport
- Throws:
ApiException- if fails to make API call
-
getTransacSmsReport
public GetTransacSmsReport getTransacSmsReport(@Nullable String startDate, @Nullable String endDate, @Nullable Long days, @Nullable String tag, @Nullable String sort) throws ApiException Get your SMS activity aggregated per day- Parameters:
startDate- **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the report (optional)endDate- **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the report (optional)days- Number of days in the past including today (positive integer). **Not compatible with 'startDate' and 'endDate'** (optional)tag- Filter on a tag (optional)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:
- GetTransacSmsReport
- Throws:
ApiException- if fails to make API call
-
getTransacSmsReport
public GetTransacSmsReport getTransacSmsReport(@Nullable String startDate, @Nullable String endDate, @Nullable Long days, @Nullable String tag, @Nullable String sort, Map<String, String> additionalHeaders) throws ApiExceptionGet your SMS activity aggregated per day- Parameters:
startDate- **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the report (optional)endDate- **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the report (optional)days- Number of days in the past including today (positive integer). **Not compatible with 'startDate' and 'endDate'** (optional)tag- Filter on a tag (optional)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:
- GetTransacSmsReport
- Throws:
ApiException- if fails to make API call
-
sendAsyncTransactionalSms
public SendSmsAsync sendAsyncTransactionalSms(@Nonnull SendTransacSms sendTransacSms) throws ApiException Send SMS message asynchronously to a mobile number- Parameters:
sendTransacSms- Values to send a transactional SMS (required)- Returns:
- SendSmsAsync
- Throws:
ApiException- if fails to make API call
-
sendAsyncTransactionalSms
public SendSmsAsync sendAsyncTransactionalSms(@Nonnull SendTransacSms sendTransacSms, Map<String, String> additionalHeaders) throws ApiExceptionSend SMS message asynchronously to a mobile number- Parameters:
sendTransacSms- Values to send a transactional SMS (required)additionalHeaders- additionalHeaders for this call- Returns:
- SendSmsAsync
- Throws:
ApiException- if fails to make API call
-
sendTransacSms
Send SMS message to a mobile number- Parameters:
sendTransacSms- Values to send a transactional SMS (required)- Returns:
- SendSms
- Throws:
ApiException- if fails to make API call
-
sendTransacSms
public SendSms sendTransacSms(@Nonnull SendTransacSms sendTransacSms, Map<String, String> additionalHeaders) throws ApiExceptionSend SMS message to a mobile number- Parameters:
sendTransacSms- Values to send a transactional SMS (required)additionalHeaders- additionalHeaders for this call- Returns:
- SendSms
- 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.
-