All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sinch.sdk.domains.sms.DeliveryReportsService Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
package com.sinch.sdk.domains.sms;

import com.sinch.sdk.core.exceptions.ApiException;
import com.sinch.sdk.domains.sms.models.DeliveryReportBatch;
import com.sinch.sdk.domains.sms.models.DeliveryReportRecipient;
import com.sinch.sdk.domains.sms.models.requests.DeliveryReportBatchGetRequestParameters;
import com.sinch.sdk.domains.sms.models.requests.DeliveryReportListRequestParameters;
import com.sinch.sdk.domains.sms.models.responses.DeliveryReportsListResponse;

/**
 * Delivery reports Service.
 *
 * 

The REST API uses message statuses and error codes in delivery reports, which refer to the * state of the batch and can be present in either Retrieve * a delivery report or sent as a callback. * * @see https://developers.sinch.com/docs/sms/api-reference/sms/tag/Delivery-reports * @since 1.0 */ public interface DeliveryReportsService { /** * Retrieve a batch delivery report. * *

Delivery reports can be retrieved even if no callback was requested. The difference between * a summary and a full report is only that the full report contains the phone numbers in E.164 format for each status * code. * * @param batchId The batch ID you received from sending a message param type param status param * code * @param parameters Filtering parameters * @return Delivery report related to batchId according to filters * @see https://developers.sinch.com/docs/sms/api-reference/sms/tag/Delivery-reports/#tag/Delivery-reports/operation/GetDeliveryReportByBatchId * @since 1.0 */ DeliveryReportBatch get(String batchId, DeliveryReportBatchGetRequestParameters parameters) throws ApiException; /** * Retrieve a recipient delivery report. * *

A recipient delivery report contains the message status for a single recipient phone number. * * @param batchId The batch ID you received from sending a message param type param status param * code * @param recipient Phone number for which you to want to search * @return Delivery report related to batchId according to filters * @see https://developers.sinch.com/docs/sms/api-reference/sms/tag/Delivery-reports/#tag/Delivery-reports/operation/GetDeliveryReportByPhoneNumber * @since 1.0 */ DeliveryReportRecipient getForNumber(String batchId, String recipient) throws ApiException; /** * Get a list of finished delivery reports. * *

This operation supports pagination. * * @param parameters Filtering parameters * @return Delivery report related to batchId according to filters * @see https://developers.sinch.com/docs/sms/api-reference/sms/tag/Delivery-reports/#tag/Delivery-reports/operation/getDeliveryReports * @since 1.0 */ DeliveryReportsListResponse list(DeliveryReportListRequestParameters parameters) throws ApiException; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy