|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gsm.oneapi.sms.SMSSend
public class SMSSend
Field Summary | |
---|---|
static boolean |
dumpRequestAndResponse
|
Constructor Summary | |
---|---|
SMSSend(ServiceEndpoints endPoints,
java.lang.String authorisationHeader)
Creates a new instance of the Send SMS API main interface. |
Method Summary | |
---|---|
int |
cancelDeliveryNotifications(java.lang.String subscriptionId)
Stop subscribing to delivery status notifications for all your sent SMS |
static void |
main(java.lang.String[] args)
|
SMSSendDeliveryStatusResponse |
queryDeliveryStatus(java.lang.String senderAddress,
java.lang.String requestId)
Query the delivery status for an SMS sent to one or more mobile terminals |
SMSSendResponse |
sendSMS(java.lang.String senderAddress,
java.lang.String[] address,
java.lang.String message,
java.lang.String clientCorrelator,
java.lang.String notifyURL,
java.lang.String senderName,
java.lang.String callbackData)
Send an SMS to one or more mobile terminals |
void |
setAuthorisationHeader(java.lang.String authorisationHeader)
Can be used to update the service authorisation header |
void |
setEndpoints(ServiceEndpoints endPoints)
Can be used to update the service endpoints |
SMSDeliveryReceiptSubscriptionResponse |
subscribeToDeliveryNotifications(java.lang.String senderAddress,
java.lang.String clientCorrelator,
java.lang.String notifyURL,
java.lang.String callbackData)
Start subscribing to delivery status notifications for all your sent SMS |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean dumpRequestAndResponse
Constructor Detail |
---|
public SMSSend(ServiceEndpoints endPoints, java.lang.String authorisationHeader)
endPoints
- contains a set of service/ call specific endpointsauthorisationHeader
- Base 64 encoded username/ passwordServiceEndpoints
,
JSONRequest.getAuthorisationHeader(String, String)
Method Detail |
---|
public void setEndpoints(ServiceEndpoints endPoints)
endPoints
- contains a set of service/ call specific endpointsServiceEndpoints
public void setAuthorisationHeader(java.lang.String authorisationHeader)
authorisationHeader
- Base 64 encoded username/ passwordJSONRequest.getAuthorisationHeader(String, String)
public SMSSendResponse sendSMS(java.lang.String senderAddress, java.lang.String[] address, java.lang.String message, java.lang.String clientCorrelator, java.lang.String notifyURL, java.lang.String senderName, java.lang.String callbackData)
senderAddress
- (mandatory) is the address to whom a responding SMS may be sent. Do not URL encode this value prior to passing to this functionaddress
- (mandatory) contains at least one address for each end user ID to send to; in this case their MSISDN including the Ôtel:Õ protocol identifier and the country code preceded by Ô+Õ. i.e., tel:+16309700001. OneAPI also supports the Anonymous Customer Reference (ACR) if provided by the operator.message
- (mandatory) contains the message text to send.Messages over 160 characters may end up being sent as two or more messages by the operator.clientCorrelator
- (optional) uniquely identifies this create MMS request. If there is a communication failure during the request, using the same clientCorrelator when retrying the request allows the operator to avoid sending the same MMS twice.senderName
- (optional) is the name to appear on the userÕs terminal as the sender of the messagenotifyURL
- (optional) is the URL to which you would like a notification of delivery sentcallbackData
- (optional) will be passed back to the notifyURL location, so you can use it to identify the message the receipt relates to (or any other useful data, such as a function name)SMSSendResponse
public SMSSendDeliveryStatusResponse queryDeliveryStatus(java.lang.String senderAddress, java.lang.String requestId)
senderAddress
- (mandatory) is the address from which SMS messages are being sent. Do not URL encode this value prior to passing to this functionrequestId
- (mandatory) contains the requestId returned from a previous call to the sendSMS functionSMSSendDeliveryStatusResponse
public SMSDeliveryReceiptSubscriptionResponse subscribeToDeliveryNotifications(java.lang.String senderAddress, java.lang.String clientCorrelator, java.lang.String notifyURL, java.lang.String callbackData)
senderAddress
- (mandatory) is the address from which SMS messages are being sent. Do not URL encode this value prior to passing to this functionnotifyURL
- (mandatory) is the URL to which you would like a notification of delivery sentclientCorrelator
- (optional) uniquely identifies this subscription request. If there is a communication failure during the request, using the same clientCorrelator when retrying the request allows the operator to avoid setting up the same subscription twicecallbackData
- (optional) will be passed back to the notifyURL location, so you can use it to identify the message the delivery receipt relates to (or any other useful data, such as a function name)SMSDeliveryReceiptSubscriptionResponse
public int cancelDeliveryNotifications(java.lang.String subscriptionId)
subscriptionId
- (mandatory) contains the subscriptionId of a previously created SMS delivery receipt subscriptionpublic static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |