twilio.rest.api.v2010.account.address package¶
Submodules¶
twilio.rest.api.v2010.account.address.dependent_phone_number module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.api.v2010.account.address.dependent_phone_number.
DependentPhoneNumberInstance
(version, payload, account_sid, address_sid)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
class
AddressRequirement
[source]¶ Bases:
object
-
ANY
= 'any'¶
-
FOREIGN
= 'foreign'¶
-
LOCAL
= 'local'¶
-
NONE
= 'none'¶
-
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
address_requirements
¶ Returns: Whether the phone number requires an Address registered with Twilio Return type: DependentPhoneNumberInstance.AddressRequirement
-
api_version
¶ Returns: The API version used to start a new TwiML session Return type: unicode
-
date_created
¶ Returns: The RFC 2822 date and time in GMT that the resource was created Return type: datetime
-
date_updated
¶ Returns: The RFC 2822 date and time in GMT that the resource was last updated Return type: datetime
-
emergency_address_sid
¶ Returns: The emergency address configuration to use for emergency calling Return type: unicode
-
emergency_status
¶ Returns: Whether the phone number is enabled for emergency calling Return type: DependentPhoneNumberInstance.EmergencyStatus
-
friendly_name
¶ Returns: The string that you assigned to describe the resource Return type: unicode
-
phone_number
¶ Returns: The phone number in E.164 format Return type: unicode
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
sms_application_sid
¶ Returns: The SID of the application that handles SMS messages sent to the phone number Return type: unicode
-
sms_fallback_method
¶ Returns: The HTTP method used with sms_fallback_url Return type: unicode
-
sms_fallback_url
¶ Returns: The URL that we call when an error occurs while retrieving or executing the TwiML Return type: unicode
-
sms_method
¶ Returns: The HTTP method to use with sms_url Return type: unicode
-
sms_url
¶ Returns: The URL we call when the phone number receives an incoming SMS message Return type: unicode
-
status_callback
¶ Returns: The URL to send status information to your application Return type: unicode
-
status_callback_method
¶ Returns: The HTTP method we use to call status_callback Return type: unicode
-
trunk_sid
¶ Returns: The SID of the Trunk that handles calls to the phone number Return type: unicode
-
uri
¶ Returns: The URI of the resource, relative to https://api.twilio.com Return type: unicode
-
voice_application_sid
¶ Returns: The SID of the application that handles calls to the phone number Return type: unicode
-
voice_fallback_method
¶ Returns: The HTTP method used with voice_fallback_url Return type: unicode
-
voice_fallback_url
¶ Returns: The URL we call when an error occurs in TwiML Return type: unicode
-
voice_method
¶ Returns: The HTTP method used with the voice_url Return type: unicode
-
voice_url
¶ Returns: The URL we call when the phone number receives a call Return type: unicode
-
class
-
class
twilio.rest.api.v2010.account.address.dependent_phone_number.
DependentPhoneNumberList
(version, account_sid, address_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
get_page
(target_url)[source]¶ Retrieve a specific page of DependentPhoneNumberInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of DependentPhoneNumberInstance Return type: twilio.rest.api.v2010.account.address.dependent_phone_number.DependentPhoneNumberPage
-
list
(limit=None, page_size=None)[source]¶ Lists DependentPhoneNumberInstance 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.address.dependent_phone_number.DependentPhoneNumberInstance]
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of DependentPhoneNumberInstance records from the API. Request is executed immediately
Parameters: Returns: Page of DependentPhoneNumberInstance
Return type: twilio.rest.api.v2010.account.address.dependent_phone_number.DependentPhoneNumberPage
-
stream
(limit=None, page_size=None)[source]¶ Streams DependentPhoneNumberInstance 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.address.dependent_phone_number.DependentPhoneNumberInstance]
-
-
class
twilio.rest.api.v2010.account.address.dependent_phone_number.
DependentPhoneNumberPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of DependentPhoneNumberInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.api.v2010.account.address.dependent_phone_number.DependentPhoneNumberInstance Return type: twilio.rest.api.v2010.account.address.dependent_phone_number.DependentPhoneNumberInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.api.v2010.account.address.
AddressContext
(version, account_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
delete
()[source]¶ Deletes the AddressInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
dependent_phone_numbers
¶ Access the dependent_phone_numbers
Returns: twilio.rest.api.v2010.account.address.dependent_phone_number.DependentPhoneNumberList Return type: twilio.rest.api.v2010.account.address.dependent_phone_number.DependentPhoneNumberList
-
fetch
()[source]¶ Fetch the AddressInstance
Returns: The fetched AddressInstance Return type: twilio.rest.api.v2010.account.address.AddressInstance
-
update
(friendly_name=<object object>, customer_name=<object object>, street=<object object>, city=<object object>, region=<object object>, postal_code=<object object>, emergency_enabled=<object object>, auto_correct_address=<object object>)[source]¶ Update the AddressInstance
Parameters: - friendly_name (unicode) – A string to describe the resource
- customer_name (unicode) – The name to associate with the address
- street (unicode) – The number and street address of the address
- city (unicode) – The city of the address
- region (unicode) – The state or region of the address
- postal_code (unicode) – The postal code of the address
- emergency_enabled (bool) – Whether to enable emergency calling on the address
- auto_correct_address (bool) – Whether we should automatically correct the address
Returns: The updated AddressInstance
Return type:
-
-
class
twilio.rest.api.v2010.account.address.
AddressInstance
(version, payload, account_sid, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that is responsible for the resource Return type: unicode
-
city
¶ Returns: The city in which the address is located Return type: unicode
-
customer_name
¶ Returns: The name associated with the address Return type: unicode
-
date_created
¶ Returns: The RFC 2822 date and time in GMT that the resource was created Return type: datetime
-
date_updated
¶ Returns: The RFC 2822 date and time in GMT that the resource was last updated Return type: datetime
-
delete
()[source]¶ Deletes the AddressInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
dependent_phone_numbers
¶ Access the dependent_phone_numbers
Returns: twilio.rest.api.v2010.account.address.dependent_phone_number.DependentPhoneNumberList Return type: twilio.rest.api.v2010.account.address.dependent_phone_number.DependentPhoneNumberList
-
emergency_enabled
¶ Returns: Whether emergency calling has been enabled on this number Return type: bool
-
fetch
()[source]¶ Fetch the AddressInstance
Returns: The fetched AddressInstance Return type: twilio.rest.api.v2010.account.address.AddressInstance
-
friendly_name
¶ Returns: The string that you assigned to describe the resource Return type: unicode
-
iso_country
¶ Returns: The ISO country code of the address Return type: unicode
-
postal_code
¶ Returns: The postal code of the address Return type: unicode
-
region
¶ Returns: The state or region of the address Return type: unicode
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
street
¶ Returns: The number and street address of the address Return type: unicode
-
update
(friendly_name=<object object>, customer_name=<object object>, street=<object object>, city=<object object>, region=<object object>, postal_code=<object object>, emergency_enabled=<object object>, auto_correct_address=<object object>)[source]¶ Update the AddressInstance
Parameters: - friendly_name (unicode) – A string to describe the resource
- customer_name (unicode) – The name to associate with the address
- street (unicode) – The number and street address of the address
- city (unicode) – The city of the address
- region (unicode) – The state or region of the address
- postal_code (unicode) – The postal code of the address
- emergency_enabled (bool) – Whether to enable emergency calling on the address
- auto_correct_address (bool) – Whether we should automatically correct the address
Returns: The updated AddressInstance
Return type:
-
uri
¶ Returns: The URI of the resource, relative to https://api.twilio.com Return type: unicode
-
-
class
twilio.rest.api.v2010.account.address.
AddressList
(version, account_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(customer_name, street, city, region, postal_code, iso_country, friendly_name=<object object>, emergency_enabled=<object object>, auto_correct_address=<object object>)[source]¶ Create the AddressInstance
Parameters: - customer_name (unicode) – The name to associate with the new address
- street (unicode) – The number and street address of the new address
- city (unicode) – The city of the new address
- region (unicode) – The state or region of the new address
- postal_code (unicode) – The postal code of the new address
- iso_country (unicode) – The ISO country code of the new address
- friendly_name (unicode) – A string to describe the new resource
- emergency_enabled (bool) – Whether to enable emergency calling on the new address
- auto_correct_address (bool) – Whether we should automatically correct the address
Returns: The created AddressInstance
Return type:
-
get
(sid)[source]¶ Constructs a AddressContext
Parameters: sid – The unique string that identifies the resource Returns: twilio.rest.api.v2010.account.address.AddressContext Return type: twilio.rest.api.v2010.account.address.AddressContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of AddressInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of AddressInstance Return type: twilio.rest.api.v2010.account.address.AddressPage
-
list
(customer_name=<object object>, friendly_name=<object object>, iso_country=<object object>, limit=None, page_size=None)[source]¶ Lists AddressInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - customer_name (unicode) – The customer_name of the Address resources to read
- friendly_name (unicode) – The string that identifies the Address resources to read
- iso_country (unicode) – The ISO country code of the Address resources to read
- 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
(customer_name=<object object>, friendly_name=<object object>, iso_country=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of AddressInstance records from the API. Request is executed immediately
Parameters: - customer_name (unicode) – The customer_name of the Address resources to read
- friendly_name (unicode) – The string that identifies the Address resources to read
- iso_country (unicode) – The ISO country code of the Address resources to read
- 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 AddressInstance
Return type:
-
stream
(customer_name=<object object>, friendly_name=<object object>, iso_country=<object object>, limit=None, page_size=None)[source]¶ Streams AddressInstance 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: - customer_name (unicode) – The customer_name of the Address resources to read
- friendly_name (unicode) – The string that identifies the Address resources to read
- iso_country (unicode) – The ISO country code of the Address resources to read
- 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.api.v2010.account.address.
AddressPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of AddressInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.api.v2010.account.address.AddressInstance Return type: twilio.rest.api.v2010.account.address.AddressInstance
-