|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hoiio.sdk.services.HttpService
com.hoiio.sdk.services.SmsService
public class SmsService
The SMS API allows developers to send/receive SMS to/from more than 200 countries around the world at a very competitive rate.
For more info please refer to: http://developer.hoiio.com/docs/sms.html
Constructor Summary | |
---|---|
SmsService(String appId,
String accessToken)
Constructs the service to make all Sms requests |
Method Summary | |
---|---|
SmsHistory |
fetchHistory()
Retrieves the history of SMS sent or received by this application. |
SmsHistory |
fetchHistory(Date from,
Date to,
Integer page)
Retrieves the history of SMS sent or received by this application. |
SmsRate |
fetchIncomingRate(String incoming)
Retrieves the billable rate that will be charged for each multipart SMS message received |
SmsRate |
fetchOutgoingRate(String dest)
Retrieves the billable rate that will be charged for each multipart SMS message sent |
SmsRate |
fetchOutgoingRate(String dest,
String msg)
Retrieves the billable rate that will be charged for each multipart SMS message sent |
Sms |
fetchSms(String txnRef)
Fetches the current status of a SMS sent previously |
SmsTxn |
send(String dest,
String msg)
Sends SMS to mobile numbers in over 200 countries |
SmsTxn |
send(String dest,
String msg,
String senderName,
String tag,
String notifyUrl)
Sends SMS to mobile numbers in over 200 countries |
BulkSmsTxn |
sendBulk(List<String> dests,
String msg)
Sends SMS in bulk (up to 1000 messages) to any mobile numbers in more than 200 countries |
BulkSmsTxn |
sendBulk(List<String> dests,
String msg,
String senderName,
String tag,
String notifyUrl)
Sends SMS in bulk (up to 1000 messages) to any mobile numbers in more than 200 countries |
BulkSmsTxn |
sendBulk(String dest,
String msg)
Sends SMS in bulk (up to 1000 messages) to any mobile numbers in more than 200 countries |
BulkSmsTxn |
sendBulk(String dest,
String msg,
String senderName,
String tag,
String notifyUrl)
Sends SMS in bulk (up to 1000 messages) to any mobile numbers in more than 200 countries |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SmsService(String appId, String accessToken)
appId
- AppID of the developeraccessToken
- AccessToken of the developerMethod Detail |
---|
public SmsHistory fetchHistory() throws HoiioException
HoiioException
public SmsHistory fetchHistory(Date from, Date to, Integer page) throws HoiioException
from
- (optional) Retrieve SMS history made by this app starting from this date/time in "YYYY-MM-DD HH:MM:SS" (GMT+8) format. E.g. "2010-01-01 00:00:00". If omitted, SMS history will be retrieved from the earliest transaction.to
- (optional) Retrieve SMS history made by this app before this date/time in "YYYY-MM-DD HH:MM:SS" (GMT+8) format. E.g. "2010-01-01 00:00:00". If omitted, SMS history will be retrieved up to the current point of time.page
- (optional) Each request returns a maximum of 100 entries. This parameter indicates which subset of entries to return.
HoiioException
public SmsRate fetchIncomingRate(String incoming) throws HoiioException
incoming
- Your Hoiio number to receive incoming SMS.
HoiioException
public SmsRate fetchOutgoingRate(String dest) throws HoiioException
dest
- The recipient number of the SMS. Phone numbers should start with a "+" and country code (E.164 format), e.g. +6511111111.
HoiioException
public SmsRate fetchOutgoingRate(String dest, String msg) throws HoiioException
dest
- The recipient number of the SMS. Phone numbers should start with a "+" and country code (E.164 format), e.g. +6511111111.msg
- (optional) If provided, an estimate of the number of multipart SMS and total cost of sending this message will be included in the response
HoiioException
public Sms fetchSms(String txnRef) throws HoiioException
txnRef
- The unique reference ID for the required transaction.
HoiioException
public SmsTxn send(String dest, String msg) throws HoiioException
dest
- The recipient number of the SMS. Phone numbers should start with a "+" and country code (E.164 format), e.g. +6511111111.msg
- Contents of the SMS message.
HoiioException
public SmsTxn send(String dest, String msg, String senderName, String tag, String notifyUrl) throws HoiioException
dest
- The recipient number of the SMS. Phone numbers should start with a "+" and country code (E.164 format), e.g. +6511111111.msg
- Contents of the SMS message.senderName
- (optional) This is the sender name that the recipient of your SMS will see.tag
- (optional) This is a text string containing your own reference ID for this transaction. This value will be included in the response for Notification, FetchSms and FetchHistory for your reference. Max 256 characters.notifyUrl
- (optional) A fully-qualified HTTP/S callback URL on your web server to be notified when the SMS has been delivered
HoiioException
public BulkSmsTxn sendBulk(List<String> dests, String msg) throws HoiioException
dests
- The list of recipient numbers of the SMS, separated by comma, up to a maximum of 1000 numbers. Phone numbers should start with a "+" and country code (E.164 format) e.g. +6511111111,+6522222222,+6533333333.msg
- Contents of the SMS message.
HoiioException
public BulkSmsTxn sendBulk(List<String> dests, String msg, String senderName, String tag, String notifyUrl) throws HoiioException
dests
- The list of recipient numbers of the SMS, separated by comma, up to a maximum of 1000 numbers. Phone numbers should start with a "+" and country code (E.164 format) e.g. +6511111111,+6522222222,+6533333333.msg
- Contents of the SMS message.senderName
- (optional) This is the sender name that the recipient of your SMS will seetag
- (optional) This is a text string containing your own reference ID for this transaction. This value will be included in the response for Notification, FetchSms and FetchHistory for your reference. Max 256 characters.notifyUrl
- (optional) A fully-qualified HTTP/S callback URL on your web server to be notified when the SMS has been delivered
HoiioException
public BulkSmsTxn sendBulk(String dest, String msg) throws HoiioException
dest
- The list of recipient numbers of the SMS, separated by comma, up to a maximum of 1000 numbers. Phone numbers should start with a "+" and country code (E.164 format) e.g. +6511111111,+6522222222,+6533333333.msg
- Contents of the SMS message.
HoiioException
public BulkSmsTxn sendBulk(String dest, String msg, String senderName, String tag, String notifyUrl) throws HoiioException
dest
- The list of recipient numbers of the SMS, separated by comma, up to a maximum of 1000 numbers. Phone numbers should start with a "+" and country code (E.164 format) e.g. +6511111111,+6522222222,+6533333333.msg
- Contents of the SMS message.senderName
- (optional) This is the sender name that the recipient of your SMS will seetag
- (optional) This is a text string containing your own reference ID for this transaction. This value will be included in the response for Notification, FetchSms and FetchHistory for your reference. Max 256 characters.notifyUrl
- (optional) A fully-qualified HTTP/S callback URL on your web server to be notified when the SMS has been delivered
HoiioException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |