twilio.rest.pricing.v1.voice package

Submodules

twilio.rest.pricing.v1.voice.country module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.pricing.v1.voice.country.CountryContext(version, iso_country)[source]

Bases: twilio.base.instance_context.InstanceContext

fetch()[source]

Fetch the CountryInstance

Returns:The fetched CountryInstance
Return type:twilio.rest.pricing.v1.voice.country.CountryInstance
class twilio.rest.pricing.v1.voice.country.CountryInstance(version, payload, iso_country=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

country
Returns:The name of the country
Return type:unicode
fetch()[source]

Fetch the CountryInstance

Returns:The fetched CountryInstance
Return type:twilio.rest.pricing.v1.voice.country.CountryInstance
inbound_call_prices
Returns:The list of InboundCallPrice records
Return type:list[unicode]
iso_country
Returns:The ISO country code
Return type:unicode
outbound_prefix_prices
Returns:The list of OutboundPrefixPrice records
Return type:list[unicode]
price_unit
Returns:The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy)
Return type:unicode
url
Returns:The absolute URL of the resource
Return type:unicode
class twilio.rest.pricing.v1.voice.country.CountryList(version)[source]

Bases: twilio.base.list_resource.ListResource

get(iso_country)[source]

Constructs a CountryContext

Parameters:iso_country – The ISO country code
Returns:twilio.rest.pricing.v1.voice.country.CountryContext
Return type:twilio.rest.pricing.v1.voice.country.CountryContext
get_page(target_url)[source]

Retrieve a specific page of CountryInstance records from the API. Request is executed immediately

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of CountryInstance
Return type:twilio.rest.pricing.v1.voice.country.CountryPage
list(limit=None, page_size=None)[source]

Lists CountryInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.

Parameters:
  • limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.pricing.v1.voice.country.CountryInstance]

page(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

Retrieve a single page of CountryInstance records from the API. Request is executed immediately

Parameters:
  • page_token (str) – PageToken provided by the API
  • page_number (int) – Page Number, this value is simply for client state
  • page_size (int) – Number of records to return, defaults to 50
Returns:

Page of CountryInstance

Return type:

twilio.rest.pricing.v1.voice.country.CountryPage

stream(limit=None, page_size=None)[source]

Streams CountryInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.

Parameters:
  • limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.pricing.v1.voice.country.CountryInstance]

class twilio.rest.pricing.v1.voice.country.CountryPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of CountryInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.pricing.v1.voice.country.CountryInstance
Return type:twilio.rest.pricing.v1.voice.country.CountryInstance

twilio.rest.pricing.v1.voice.number module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.pricing.v1.voice.number.NumberContext(version, number)[source]

Bases: twilio.base.instance_context.InstanceContext

fetch()[source]

Fetch the NumberInstance

Returns:The fetched NumberInstance
Return type:twilio.rest.pricing.v1.voice.number.NumberInstance
class twilio.rest.pricing.v1.voice.number.NumberInstance(version, payload, number=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

country
Returns:The name of the country
Return type:unicode
fetch()[source]

Fetch the NumberInstance

Returns:The fetched NumberInstance
Return type:twilio.rest.pricing.v1.voice.number.NumberInstance
inbound_call_price
Returns:The InboundCallPrice record
Return type:unicode
iso_country
Returns:The ISO country code
Return type:unicode
number
Returns:The phone number
Return type:unicode
outbound_call_price
Returns:The OutboundCallPrice record
Return type:unicode
price_unit
Returns:The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy)
Return type:unicode
url
Returns:The absolute URL of the resource
Return type:unicode
class twilio.rest.pricing.v1.voice.number.NumberList(version)[source]

Bases: twilio.base.list_resource.ListResource

get(number)[source]

Constructs a NumberContext

Parameters:number – The phone number to fetch
Returns:twilio.rest.pricing.v1.voice.number.NumberContext
Return type:twilio.rest.pricing.v1.voice.number.NumberContext
class twilio.rest.pricing.v1.voice.number.NumberPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of NumberInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.pricing.v1.voice.number.NumberInstance
Return type:twilio.rest.pricing.v1.voice.number.NumberInstance

Module contents

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.pricing.v1.voice.VoiceInstance(version, payload)[source]

Bases: twilio.base.instance_resource.InstanceResource

Returns:The links
Return type:unicode
name
Returns:The name
Return type:unicode
url
Returns:The url
Return type:unicode
class twilio.rest.pricing.v1.voice.VoiceList(version)[source]

Bases: twilio.base.list_resource.ListResource

countries

Access the countries

Returns:twilio.rest.pricing.v1.voice.country.CountryList
Return type:twilio.rest.pricing.v1.voice.country.CountryList
numbers

Access the numbers

Returns:twilio.rest.pricing.v1.voice.number.NumberList
Return type:twilio.rest.pricing.v1.voice.number.NumberList
class twilio.rest.pricing.v1.voice.VoicePage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of VoiceInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.pricing.v1.voice.VoiceInstance
Return type:twilio.rest.pricing.v1.voice.VoiceInstance