Class TransactionalSmsApi

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

public class TransactionalSmsApi extends BaseApi
  • Constructor Details

    • TransactionalSmsApi

      public TransactionalSmsApi()
    • TransactionalSmsApi

      public TransactionalSmsApi(ApiClient apiClient)
  • Method Details

    • getSmsEvents

      public GetSmsEventReport getSmsEvents(Long limit, String startDate, String endDate, Long offset, Long days, String phoneNumber, String event, String tags, 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(Long limit, String startDate, String endDate, Long offset, Long days, String phoneNumber, String event, String tags, String sort, Map<String,String> additionalHeaders) 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)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GetSmsEventReport
      Throws:
      ApiException - if fails to make API call
    • getTransacAggregatedSmsReport

      public GetTransacAggregatedSmsReport getTransacAggregatedSmsReport(String startDate, String endDate, Long days, 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(String startDate, String endDate, Long days, String tag, Map<String,String> additionalHeaders) 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)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GetTransacAggregatedSmsReport
      Throws:
      ApiException - if fails to make API call
    • getTransacSmsReport

      public GetTransacSmsReport getTransacSmsReport(String startDate, String endDate, Long days, String tag, 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(String startDate, String endDate, Long days, String tag, String sort, Map<String,String> additionalHeaders) 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)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GetTransacSmsReport
      Throws:
      ApiException - if fails to make API call
    • sendTransacSms

      public SendSms sendTransacSms(SendTransacSms sendTransacSms) throws ApiException
      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(SendTransacSms sendTransacSms, Map<String,String> additionalHeaders) throws ApiException
      Send 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 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.