twilio.rest.api.v2010.account.available_phone_number package

Submodules

twilio.rest.api.v2010.account.available_phone_number.local module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/api/v2010/account/available_phone_number/local.py:docstring of twilio.rest.api.v2010.account.available_phone_number.local, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.api.v2010.account.available_phone_number.local.LocalInstance(version, payload, account_sid, country_code)[source]

Bases: twilio.base.instance_resource.InstanceResource

address_requirements
Returns:The type of Address resource the phone number requires
Return type:unicode
beta
Returns:Whether the phone number is new to the Twilio platform
Return type:bool
capabilities
Returns:Whether a phone number can receive calls or messages
Return type:unicode
friendly_name
Returns:A formatted version of the phone number
Return type:unicode
iso_country
Returns:The ISO country code of this phone number
Return type:unicode
lata
Returns:The LATA of this phone number
Return type:unicode
latitude
Returns:The latitude of this phone number’s location
Return type:unicode
locality
Returns:The locality or city of this phone number’s location
Return type:unicode
longitude
Returns:The longitude of this phone number’s location
Return type:unicode
phone_number
Returns:The phone number in E.164 format
Return type:unicode
postal_code
Returns:The postal or ZIP code of this phone number’s location
Return type:unicode
rate_center
Returns:The rate center of this phone number
Return type:unicode
region
Returns:The two-letter state or province abbreviation of this phone number’s location
Return type:unicode
class twilio.rest.api.v2010.account.available_phone_number.local.LocalList(version, account_sid, country_code)[source]

Bases: twilio.base.list_resource.ListResource

get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of LocalInstance
Return type:twilio.rest.api.v2010.account.available_phone_number.local.LocalPage
list(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, limit=None, page_size=None)[source]

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

Parameters:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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.api.v2010.account.available_phone_number.local.LocalInstance]

page(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

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

Parameters:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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 LocalInstance

Return type:

twilio.rest.api.v2010.account.available_phone_number.local.LocalPage

stream(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, limit=None, page_size=None)[source]

Streams LocalInstance 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:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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.api.v2010.account.available_phone_number.local.LocalInstance]

class twilio.rest.api.v2010.account.available_phone_number.local.LocalPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of LocalInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.api.v2010.account.available_phone_number.local.LocalInstance
Return type:twilio.rest.api.v2010.account.available_phone_number.local.LocalInstance

twilio.rest.api.v2010.account.available_phone_number.machine_to_machine module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/api/v2010/account/available_phone_number/machine_to_machine.py:docstring of twilio.rest.api.v2010.account.available_phone_number.machine_to_machine, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.api.v2010.account.available_phone_number.machine_to_machine.MachineToMachineInstance(version, payload, account_sid, country_code)[source]

Bases: twilio.base.instance_resource.InstanceResource

address_requirements
Returns:The type of Address resource the phone number requires
Return type:unicode
beta
Returns:Whether the phone number is new to the Twilio platform
Return type:bool
capabilities
Returns:Whether a phone number can receive calls or messages
Return type:unicode
friendly_name
Returns:A formatted version of the phone number
Return type:unicode
iso_country
Returns:The ISO country code of this phone number
Return type:unicode
lata
Returns:The LATA of this phone number
Return type:unicode
latitude
Returns:The latitude of this phone number’s location
Return type:unicode
locality
Returns:The locality or city of this phone number’s location
Return type:unicode
longitude
Returns:The longitude of this phone number’s location
Return type:unicode
phone_number
Returns:The phone number in E.164 format
Return type:unicode
postal_code
Returns:The postal or ZIP code of this phone number’s location
Return type:unicode
rate_center
Returns:The rate center of this phone number
Return type:unicode
region
Returns:The two-letter state or province abbreviation of this phone number’s location
Return type:unicode
class twilio.rest.api.v2010.account.available_phone_number.machine_to_machine.MachineToMachineList(version, account_sid, country_code)[source]

Bases: twilio.base.list_resource.ListResource

get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of MachineToMachineInstance
Return type:twilio.rest.api.v2010.account.available_phone_number.machine_to_machine.MachineToMachinePage
list(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, limit=None, page_size=None)[source]

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

Parameters:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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.api.v2010.account.available_phone_number.machine_to_machine.MachineToMachineInstance]

page(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

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

Parameters:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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 MachineToMachineInstance

Return type:

twilio.rest.api.v2010.account.available_phone_number.machine_to_machine.MachineToMachinePage

stream(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, limit=None, page_size=None)[source]

Streams MachineToMachineInstance 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:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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.api.v2010.account.available_phone_number.machine_to_machine.MachineToMachineInstance]

class twilio.rest.api.v2010.account.available_phone_number.machine_to_machine.MachineToMachinePage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of MachineToMachineInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.api.v2010.account.available_phone_number.machine_to_machine.MachineToMachineInstance
Return type:twilio.rest.api.v2010.account.available_phone_number.machine_to_machine.MachineToMachineInstance

twilio.rest.api.v2010.account.available_phone_number.mobile module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/api/v2010/account/available_phone_number/mobile.py:docstring of twilio.rest.api.v2010.account.available_phone_number.mobile, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.api.v2010.account.available_phone_number.mobile.MobileInstance(version, payload, account_sid, country_code)[source]

Bases: twilio.base.instance_resource.InstanceResource

address_requirements
Returns:The type of Address resource the phone number requires
Return type:unicode
beta
Returns:Whether the phone number is new to the Twilio platform
Return type:bool
capabilities
Returns:Whether a phone number can receive calls or messages
Return type:unicode
friendly_name
Returns:A formatted version of the phone number
Return type:unicode
iso_country
Returns:The ISO country code of this phone number
Return type:unicode
lata
Returns:The LATA of this phone number
Return type:unicode
latitude
Returns:The latitude of this phone number’s location
Return type:unicode
locality
Returns:The locality or city of this phone number’s location
Return type:unicode
longitude
Returns:The longitude of this phone number’s location
Return type:unicode
phone_number
Returns:The phone number in E.164 format
Return type:unicode
postal_code
Returns:The postal or ZIP code of this phone number’s location
Return type:unicode
rate_center
Returns:The rate center of this phone number
Return type:unicode
region
Returns:The two-letter state or province abbreviation of this phone number’s location
Return type:unicode
class twilio.rest.api.v2010.account.available_phone_number.mobile.MobileList(version, account_sid, country_code)[source]

Bases: twilio.base.list_resource.ListResource

get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of MobileInstance
Return type:twilio.rest.api.v2010.account.available_phone_number.mobile.MobilePage
list(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, limit=None, page_size=None)[source]

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

Parameters:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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.api.v2010.account.available_phone_number.mobile.MobileInstance]

page(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

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

Parameters:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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 MobileInstance

Return type:

twilio.rest.api.v2010.account.available_phone_number.mobile.MobilePage

stream(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, limit=None, page_size=None)[source]

Streams MobileInstance 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:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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.api.v2010.account.available_phone_number.mobile.MobileInstance]

class twilio.rest.api.v2010.account.available_phone_number.mobile.MobilePage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of MobileInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.api.v2010.account.available_phone_number.mobile.MobileInstance
Return type:twilio.rest.api.v2010.account.available_phone_number.mobile.MobileInstance

twilio.rest.api.v2010.account.available_phone_number.national module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/api/v2010/account/available_phone_number/national.py:docstring of twilio.rest.api.v2010.account.available_phone_number.national, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.api.v2010.account.available_phone_number.national.NationalInstance(version, payload, account_sid, country_code)[source]

Bases: twilio.base.instance_resource.InstanceResource

address_requirements
Returns:The type of Address resource the phone number requires
Return type:unicode
beta
Returns:Whether the phone number is new to the Twilio platform
Return type:bool
capabilities
Returns:Whether a phone number can receive calls or messages
Return type:unicode
friendly_name
Returns:A formatted version of the phone number
Return type:unicode
iso_country
Returns:The ISO country code of this phone number
Return type:unicode
lata
Returns:The LATA of this phone number
Return type:unicode
latitude
Returns:The latitude of this phone number’s location
Return type:unicode
locality
Returns:The locality or city of this phone number’s location
Return type:unicode
longitude
Returns:The longitude of this phone number’s location
Return type:unicode
phone_number
Returns:The phone number in E.164 format
Return type:unicode
postal_code
Returns:The postal or ZIP code of this phone number’s location
Return type:unicode
rate_center
Returns:The rate center of this phone number
Return type:unicode
region
Returns:The two-letter state or province abbreviation of this phone number’s location
Return type:unicode
class twilio.rest.api.v2010.account.available_phone_number.national.NationalList(version, account_sid, country_code)[source]

Bases: twilio.base.list_resource.ListResource

get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of NationalInstance
Return type:twilio.rest.api.v2010.account.available_phone_number.national.NationalPage
list(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, limit=None, page_size=None)[source]

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

Parameters:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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.api.v2010.account.available_phone_number.national.NationalInstance]

page(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

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

Parameters:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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 NationalInstance

Return type:

twilio.rest.api.v2010.account.available_phone_number.national.NationalPage

stream(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, limit=None, page_size=None)[source]

Streams NationalInstance 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:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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.api.v2010.account.available_phone_number.national.NationalInstance]

class twilio.rest.api.v2010.account.available_phone_number.national.NationalPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of NationalInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.api.v2010.account.available_phone_number.national.NationalInstance
Return type:twilio.rest.api.v2010.account.available_phone_number.national.NationalInstance

twilio.rest.api.v2010.account.available_phone_number.shared_cost module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/api/v2010/account/available_phone_number/shared_cost.py:docstring of twilio.rest.api.v2010.account.available_phone_number.shared_cost, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.api.v2010.account.available_phone_number.shared_cost.SharedCostInstance(version, payload, account_sid, country_code)[source]

Bases: twilio.base.instance_resource.InstanceResource

address_requirements
Returns:The type of Address resource the phone number requires
Return type:unicode
beta
Returns:Whether the phone number is new to the Twilio platform
Return type:bool
capabilities
Returns:Whether a phone number can receive calls or messages
Return type:unicode
friendly_name
Returns:A formatted version of the phone number
Return type:unicode
iso_country
Returns:The ISO country code of this phone number
Return type:unicode
lata
Returns:The LATA of this phone number
Return type:unicode
latitude
Returns:The latitude of this phone number’s location
Return type:unicode
locality
Returns:The locality or city of this phone number’s location
Return type:unicode
longitude
Returns:The longitude of this phone number’s location
Return type:unicode
phone_number
Returns:The phone number in E.164 format
Return type:unicode
postal_code
Returns:The postal or ZIP code of this phone number’s location
Return type:unicode
rate_center
Returns:The rate center of this phone number
Return type:unicode
region
Returns:The two-letter state or province abbreviation of this phone number’s location
Return type:unicode
class twilio.rest.api.v2010.account.available_phone_number.shared_cost.SharedCostList(version, account_sid, country_code)[source]

Bases: twilio.base.list_resource.ListResource

get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of SharedCostInstance
Return type:twilio.rest.api.v2010.account.available_phone_number.shared_cost.SharedCostPage
list(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, limit=None, page_size=None)[source]

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

Parameters:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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.api.v2010.account.available_phone_number.shared_cost.SharedCostInstance]

page(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

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

Parameters:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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 SharedCostInstance

Return type:

twilio.rest.api.v2010.account.available_phone_number.shared_cost.SharedCostPage

stream(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, limit=None, page_size=None)[source]

Streams SharedCostInstance 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:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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.api.v2010.account.available_phone_number.shared_cost.SharedCostInstance]

class twilio.rest.api.v2010.account.available_phone_number.shared_cost.SharedCostPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of SharedCostInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.api.v2010.account.available_phone_number.shared_cost.SharedCostInstance
Return type:twilio.rest.api.v2010.account.available_phone_number.shared_cost.SharedCostInstance

twilio.rest.api.v2010.account.available_phone_number.toll_free module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/api/v2010/account/available_phone_number/toll_free.py:docstring of twilio.rest.api.v2010.account.available_phone_number.toll_free, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.api.v2010.account.available_phone_number.toll_free.TollFreeInstance(version, payload, account_sid, country_code)[source]

Bases: twilio.base.instance_resource.InstanceResource

address_requirements
Returns:The type of Address resource the phone number requires
Return type:unicode
beta
Returns:Whether the phone number is new to the Twilio platform
Return type:bool
capabilities
Returns:Whether a phone number can receive calls or messages
Return type:unicode
friendly_name
Returns:A formatted version of the phone number
Return type:unicode
iso_country
Returns:The ISO country code of this phone number
Return type:unicode
lata
Returns:The LATA of this phone number
Return type:unicode
latitude
Returns:The latitude of this phone number’s location
Return type:unicode
locality
Returns:The locality or city of this phone number’s location
Return type:unicode
longitude
Returns:The longitude of this phone number’s location
Return type:unicode
phone_number
Returns:The phone number in E.164 format
Return type:unicode
postal_code
Returns:The postal or ZIP code of this phone number’s location
Return type:unicode
rate_center
Returns:The rate center of this phone number
Return type:unicode
region
Returns:The two-letter state or province abbreviation of this phone number’s location
Return type:unicode
class twilio.rest.api.v2010.account.available_phone_number.toll_free.TollFreeList(version, account_sid, country_code)[source]

Bases: twilio.base.list_resource.ListResource

get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of TollFreeInstance
Return type:twilio.rest.api.v2010.account.available_phone_number.toll_free.TollFreePage
list(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, limit=None, page_size=None)[source]

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

Parameters:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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.api.v2010.account.available_phone_number.toll_free.TollFreeInstance]

page(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

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

Parameters:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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 TollFreeInstance

Return type:

twilio.rest.api.v2010.account.available_phone_number.toll_free.TollFreePage

stream(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, limit=None, page_size=None)[source]

Streams TollFreeInstance 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:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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.api.v2010.account.available_phone_number.toll_free.TollFreeInstance]

class twilio.rest.api.v2010.account.available_phone_number.toll_free.TollFreePage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of TollFreeInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.api.v2010.account.available_phone_number.toll_free.TollFreeInstance
Return type:twilio.rest.api.v2010.account.available_phone_number.toll_free.TollFreeInstance

twilio.rest.api.v2010.account.available_phone_number.voip module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/api/v2010/account/available_phone_number/voip.py:docstring of twilio.rest.api.v2010.account.available_phone_number.voip, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.api.v2010.account.available_phone_number.voip.VoipInstance(version, payload, account_sid, country_code)[source]

Bases: twilio.base.instance_resource.InstanceResource

address_requirements
Returns:The type of Address resource the phone number requires
Return type:unicode
beta
Returns:Whether the phone number is new to the Twilio platform
Return type:bool
capabilities
Returns:Whether a phone number can receive calls or messages
Return type:unicode
friendly_name
Returns:A formatted version of the phone number
Return type:unicode
iso_country
Returns:The ISO country code of this phone number
Return type:unicode
lata
Returns:The LATA of this phone number
Return type:unicode
latitude
Returns:The latitude of this phone number’s location
Return type:unicode
locality
Returns:The locality or city of this phone number’s location
Return type:unicode
longitude
Returns:The longitude of this phone number’s location
Return type:unicode
phone_number
Returns:The phone number in E.164 format
Return type:unicode
postal_code
Returns:The postal or ZIP code of this phone number’s location
Return type:unicode
rate_center
Returns:The rate center of this phone number
Return type:unicode
region
Returns:The two-letter state or province abbreviation of this phone number’s location
Return type:unicode
class twilio.rest.api.v2010.account.available_phone_number.voip.VoipList(version, account_sid, country_code)[source]

Bases: twilio.base.list_resource.ListResource

get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of VoipInstance
Return type:twilio.rest.api.v2010.account.available_phone_number.voip.VoipPage
list(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, limit=None, page_size=None)[source]

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

Parameters:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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.api.v2010.account.available_phone_number.voip.VoipInstance]

page(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

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

Parameters:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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 VoipInstance

Return type:

twilio.rest.api.v2010.account.available_phone_number.voip.VoipPage

stream(area_code=<object object>, contains=<object object>, sms_enabled=<object object>, mms_enabled=<object object>, voice_enabled=<object object>, exclude_all_address_required=<object object>, exclude_local_address_required=<object object>, exclude_foreign_address_required=<object object>, beta=<object object>, near_number=<object object>, near_lat_long=<object object>, distance=<object object>, in_postal_code=<object object>, in_region=<object object>, in_rate_center=<object object>, in_lata=<object object>, in_locality=<object object>, fax_enabled=<object object>, limit=None, page_size=None)[source]

Streams VoipInstance 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:
  • area_code (unicode) – The area code of the phone numbers to read
  • contains (unicode) – The pattern on which to match phone numbers
  • sms_enabled (bool) – Whether the phone numbers can receive text messages
  • mms_enabled (bool) – Whether the phone numbers can receive MMS messages
  • voice_enabled (bool) – Whether the phone numbers can receive calls.
  • exclude_all_address_required (bool) – Whether to exclude phone numbers that require an Address
  • exclude_local_address_required (bool) – Whether to exclude phone numbers that require a local address
  • exclude_foreign_address_required (bool) – Whether to exclude phone numbers that require a foreign address
  • beta (bool) – Whether to read phone numbers new to the Twilio platform
  • near_number (unicode) – Given a phone number, find a geographically close number within distance miles. (US/Canada only)
  • near_lat_long (unicode) – Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
  • distance (unicode) – The search radius, in miles, for a near_ query. (US/Canada only)
  • in_postal_code (unicode) – Limit results to a particular postal code. (US/Canada only)
  • in_region (unicode) – Limit results to a particular region. (US/Canada only)
  • in_rate_center (unicode) – Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
  • in_lata (unicode) – Limit results to a specific local access and transport area. (US/Canada only)
  • in_locality (unicode) – Limit results to a particular locality
  • fax_enabled (bool) – Whether the phone numbers can receive faxes
  • 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.api.v2010.account.available_phone_number.voip.VoipInstance]

class twilio.rest.api.v2010.account.available_phone_number.voip.VoipPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of VoipInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.api.v2010.account.available_phone_number.voip.VoipInstance
Return type:twilio.rest.api.v2010.account.available_phone_number.voip.VoipInstance

Module contents

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

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/api/v2010/account/available_phone_number/__init__.py:docstring of twilio.rest.api.v2010.account.available_phone_number, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryContext(version, account_sid, country_code)[source]

Bases: twilio.base.instance_context.InstanceContext

fetch()[source]

Fetch the AvailablePhoneNumberCountryInstance

Returns:The fetched AvailablePhoneNumberCountryInstance
Return type:twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryInstance
local

Access the local

Returns:twilio.rest.api.v2010.account.available_phone_number.local.LocalList
Return type:twilio.rest.api.v2010.account.available_phone_number.local.LocalList
machine_to_machine

Access the machine_to_machine

Returns:twilio.rest.api.v2010.account.available_phone_number.machine_to_machine.MachineToMachineList
Return type:twilio.rest.api.v2010.account.available_phone_number.machine_to_machine.MachineToMachineList
mobile

Access the mobile

Returns:twilio.rest.api.v2010.account.available_phone_number.mobile.MobileList
Return type:twilio.rest.api.v2010.account.available_phone_number.mobile.MobileList
national

Access the national

Returns:twilio.rest.api.v2010.account.available_phone_number.national.NationalList
Return type:twilio.rest.api.v2010.account.available_phone_number.national.NationalList
shared_cost

Access the shared_cost

Returns:twilio.rest.api.v2010.account.available_phone_number.shared_cost.SharedCostList
Return type:twilio.rest.api.v2010.account.available_phone_number.shared_cost.SharedCostList
toll_free

Access the toll_free

Returns:twilio.rest.api.v2010.account.available_phone_number.toll_free.TollFreeList
Return type:twilio.rest.api.v2010.account.available_phone_number.toll_free.TollFreeList
voip

Access the voip

Returns:twilio.rest.api.v2010.account.available_phone_number.voip.VoipList
Return type:twilio.rest.api.v2010.account.available_phone_number.voip.VoipList
class twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryInstance(version, payload, account_sid, country_code=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

beta
Returns:Whether all phone numbers available in the country are new to the Twilio platform.
Return type:bool
country
Returns:The name of the country
Return type:unicode
country_code
Returns:The ISO-3166-1 country code of the country.
Return type:unicode
fetch()[source]

Fetch the AvailablePhoneNumberCountryInstance

Returns:The fetched AvailablePhoneNumberCountryInstance
Return type:twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryInstance
local

Access the local

Returns:twilio.rest.api.v2010.account.available_phone_number.local.LocalList
Return type:twilio.rest.api.v2010.account.available_phone_number.local.LocalList
machine_to_machine

Access the machine_to_machine

Returns:twilio.rest.api.v2010.account.available_phone_number.machine_to_machine.MachineToMachineList
Return type:twilio.rest.api.v2010.account.available_phone_number.machine_to_machine.MachineToMachineList
mobile

Access the mobile

Returns:twilio.rest.api.v2010.account.available_phone_number.mobile.MobileList
Return type:twilio.rest.api.v2010.account.available_phone_number.mobile.MobileList
national

Access the national

Returns:twilio.rest.api.v2010.account.available_phone_number.national.NationalList
Return type:twilio.rest.api.v2010.account.available_phone_number.national.NationalList
shared_cost

Access the shared_cost

Returns:twilio.rest.api.v2010.account.available_phone_number.shared_cost.SharedCostList
Return type:twilio.rest.api.v2010.account.available_phone_number.shared_cost.SharedCostList
subresource_uris
Returns:A list of related resources identified by their relative URIs
Return type:unicode
toll_free

Access the toll_free

Returns:twilio.rest.api.v2010.account.available_phone_number.toll_free.TollFreeList
Return type:twilio.rest.api.v2010.account.available_phone_number.toll_free.TollFreeList
uri
Returns:The URI of the Country resource, relative to https://api.twilio.com
Return type:unicode
voip

Access the voip

Returns:twilio.rest.api.v2010.account.available_phone_number.voip.VoipList
Return type:twilio.rest.api.v2010.account.available_phone_number.voip.VoipList
class twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryList(version, account_sid)[source]

Bases: twilio.base.list_resource.ListResource

get(country_code)[source]

Constructs a AvailablePhoneNumberCountryContext

Parameters:country_code – The ISO country code of the country to fetch available phone number information about
Returns:twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryContext
Return type:twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryContext
get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of AvailablePhoneNumberCountryInstance
Return type:twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryPage
list(limit=None, page_size=None)[source]

Lists AvailablePhoneNumberCountryInstance 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.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryInstance]

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

Retrieve a single page of AvailablePhoneNumberCountryInstance 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 AvailablePhoneNumberCountryInstance

Return type:

twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryPage

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

Streams AvailablePhoneNumberCountryInstance 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.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryInstance]

class twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of AvailablePhoneNumberCountryInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryInstance
Return type:twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryInstance