hoiio.service.number¶
- class hoiio.service.number.Number¶
Provide Number services such as subscribing and configuring the numbers.
- available_countries(**kwargs)¶
Returns the countries that have Hoiio numbers.
Returns: Return hoiio.service.Response
- available_numbers(country, state=None, **kwargs)¶
Returns the available numbers for purchase
Parameters: - country – The country with available numbers
- state – The state in the country. Required for countries with states.
Returns: Return hoiio.service.Response
- configure(number, **kwargs)¶
Configure a number. It is recommended to use configure_voice, configure_fax or configure_sms instead of this.
Parameters: - number – The number to configure
- forward_to – The notify_url when there is an incoming call (could be voice or fax depending on mode).
- forward_sms_to – The notify_url when there is an incoming SMS
- mode (voice or fax) – The mode for incoming call. It can either be voice or fax (but not both). Default to voice.
Returns: Return hoiio.service.Response
- rate(country, **kwargs)¶
Returns the subscription cost of the country
Parameters: country – Subscription cost of the country Returns: Return hoiio.service.Response
- subscribe(number, duration, **kwargs)¶
Subscribe a number
Parameters: - number – The number to subscribe to
- duration (1, 3, 12 or auto_extend) – The number of months to subscribe to
Returns: Return hoiio.service.Response
- subscribed_numbers(**kwargs)¶
Retrieve the list of subscribed numbers
Returns: Return hoiio.service.Response