twilio.rest.pricing.v2.voice package¶
Submodules¶
twilio.rest.pricing.v2.voice.country module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.pricing.v2.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.v2.voice.country.CountryInstance
-
-
class
twilio.rest.pricing.v2.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.v2.voice.country.CountryInstance
-
iso_country¶ Returns: The ISO country code Return type: unicode
-
outbound_prefix_prices¶ Returns: The list of OutboundPrefixPriceWithOrigin 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.v2.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 of the pricing information to fetch Returns: twilio.rest.pricing.v2.voice.country.CountryContext Return type: twilio.rest.pricing.v2.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.v2.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:
-
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: Returns: Page of CountryInstance
Return type:
-
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:
-
-
class
twilio.rest.pricing.v2.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.v2.voice.country.CountryInstance Return type: twilio.rest.pricing.v2.voice.country.CountryInstance
-
twilio.rest.pricing.v2.voice.number module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.pricing.v2.voice.number.NumberContext(version, destination_number)[source]¶ Bases:
twilio.base.instance_context.InstanceContext-
fetch(origination_number=<object object>)[source]¶ Fetch the NumberInstance
Parameters: origination_number (unicode) – The origination number for which to fetch pricing information Returns: The fetched NumberInstance Return type: twilio.rest.pricing.v2.voice.number.NumberInstance
-
-
class
twilio.rest.pricing.v2.voice.number.NumberInstance(version, payload, destination_number=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource-
country¶ Returns: The name of the country Return type: unicode
-
destination_number¶ Returns: The destination phone number, in E.164 format Return type: unicode
-
fetch(origination_number=<object object>)[source]¶ Fetch the NumberInstance
Parameters: origination_number (unicode) – The origination number for which to fetch pricing information Returns: The fetched NumberInstance Return type: twilio.rest.pricing.v2.voice.number.NumberInstance
-
inbound_call_price¶ Returns: The InboundCallPrice record Return type: unicode
-
iso_country¶ Returns: The ISO country code Return type: unicode
-
origination_number¶ Returns: The origination phone number, in E.164 format Return type: unicode
-
outbound_call_prices¶ Returns: The list of OutboundCallPriceWithOrigin 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.v2.voice.number.NumberList(version)[source]¶ Bases:
twilio.base.list_resource.ListResource-
get(destination_number)[source]¶ Constructs a NumberContext
Parameters: destination_number – The destination number for which to fetch pricing information Returns: twilio.rest.pricing.v2.voice.number.NumberContext Return type: twilio.rest.pricing.v2.voice.number.NumberContext
-
-
class
twilio.rest.pricing.v2.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.v2.voice.number.NumberInstance Return type: twilio.rest.pricing.v2.voice.number.NumberInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.pricing.v2.voice.VoiceInstance(version, payload)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource-
links¶ Returns: The URLs of the related Countries and Numbers resources Return type: unicode
-
name¶ Returns: The resource name Return type: unicode
-
url¶ Returns: The absolute URL of the resource Return type: unicode
-
-
class
twilio.rest.pricing.v2.voice.VoiceList(version)[source]¶ Bases:
twilio.base.list_resource.ListResource-
countries¶ Access the countries
Returns: twilio.rest.pricing.v2.voice.country.CountryList Return type: twilio.rest.pricing.v2.voice.country.CountryList
-
numbers¶ Access the numbers
Returns: twilio.rest.pricing.v2.voice.number.NumberList Return type: twilio.rest.pricing.v2.voice.number.NumberList
-
-
class
twilio.rest.pricing.v2.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.v2.voice.VoiceInstance Return type: twilio.rest.pricing.v2.voice.VoiceInstance
-