|
||||||||||
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.NumberService
public class NumberService
The Number API will allow developers to have full control over how they assign their Hoiio Numbers to their IVR applications.
For more info please refer to: http://developer.hoiio.com/docs/number.html
Constructor Summary | |
---|---|
NumberService(String appId,
String accessToken)
Constructs the service to make all Number requests |
Method Summary | |
---|---|
ActiveNumber |
fetchActiveNumbers()
Retrieves the list of Hoiio Numbers that is assigned to your application and their current configuration. |
AvailableNumber |
fetchAvailableNumbers(String country)
Returns a list of available Hoiio Numbers for subscription in a given country |
AvailableNumber |
fetchAvailableNumbers(String country,
String state)
Returns a list of available Hoiio Numbers for subscription in a given country |
AvailableNumber |
fetchAvailableNumbers(String country,
String state,
Integer page)
Returns a list of available Hoiio Numbers for subscription in a given country |
NumberRate |
fetchRate(String country)
Retrieves the billable rate that will be charged for subscribing to a Hoiio Number |
SupportedCountry |
fetchSupportedCountry()
Retrieves a list of countries for which there are Hoiio Numbers available for subscription. |
Subscribe |
subscribe(String number,
NumberDuration duration)
Subscribes for a new Hoiio Number or extend an existing subscription of a Hoiio Number |
UpdateForwarding |
updateForwarding(String number)
Configures the URL that the incoming call notification and incoming SMS notification for your Hoiio Number will be sent to |
UpdateForwarding |
updateForwarding(String number,
String forwardTo,
String forwardToSms,
VoiceMode mode)
Configures the URL that the incoming call notification and incoming SMS notification for your Hoiio Number will be sent to |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NumberService(String appId, String accessToken)
appId
- AppID of the developeraccessToken
- AccessToken of the developerMethod Detail |
---|
public ActiveNumber fetchActiveNumbers() throws HoiioException
HoiioException
public AvailableNumber fetchAvailableNumbers(String country) throws HoiioException
country
- Select the country that you wish to browse the list of available Hoiio Numbers. Use country code in ISO 3166-1 alpha-2 format.
HoiioException
public AvailableNumber fetchAvailableNumbers(String country, String state) throws HoiioException
country
- Select the country that you wish to browse the list of available Hoiio Numbers. Use country code in ISO 3166-1 alpha-2 format.state
- (required for USA) Select the state within the country to browse the list of available Hoiio Numbers. Use the two letter state code defined in ISO 3166-2.
HoiioException
public AvailableNumber fetchAvailableNumbers(String country, String state, Integer page) throws HoiioException
country
- Select the country that you wish to browse the list of available Hoiio Numbers. Use country code in ISO 3166-1 alpha-2 format.state
- (required for USA) Select the state within the country to browse the list of available Hoiio Numbers. Use the two letter state code defined in ISO 3166-2.page
- (optional) Each request returns a maximum of 20 entries. This parameter indicates which subset of entries to return.
HoiioException
public NumberRate fetchRate(String country) throws HoiioException
country
- Select the country that you wish to check the rates. Use country code in ISO 3166-1 alpha-2 format.
HoiioException
public SupportedCountry fetchSupportedCountry() throws HoiioException
HoiioException
public Subscribe subscribe(String number, NumberDuration duration) throws HoiioException
number
- The Hoiio Number that you want to subscribe or extend subscription. Numbers should start with a "+" and country code (E.164 format), e.g. +6511111111.duration
- The number of months that you wished to subscribe or extend subscription for the specified Hoiio Number: 1,3,12, auto_extend
HoiioException
public UpdateForwarding updateForwarding(String number) throws HoiioException
number
- The Hoiio Number to configure. Phone numbers should start with a "+" and country code (E.164 format), e.g. +6511111111.
HoiioException
public UpdateForwarding updateForwarding(String number, String forwardTo, String forwardToSms, VoiceMode mode) throws HoiioException
number
- The Hoiio Number to configure. Phone numbers should start with a "+" and country code (E.164 format), e.g. +6511111111.forwardTo
- (optional) A fully-qualified HTTP/S URL on your web server to be notified when there is an incoming voice call/faxforwardToSms
- (optional) A fully-qualified HTTP/S URL on your web server to be notified when there is an incoming SMSmode
- (optional) Indicate whether to use the number for incoming voice call or fax
HoiioException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |