twilio.rest.proxy.v1.service package¶
Subpackages¶
Submodules¶
twilio.rest.proxy.v1.service.phone_number module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.proxy.v1.service.phone_number.PhoneNumberContext(version, service_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContextPLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
delete()[source]¶ Deletes the PhoneNumberInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch()[source]¶ Fetch the PhoneNumberInstance
Returns: The fetched PhoneNumberInstance Return type: twilio.rest.proxy.v1.service.phone_number.PhoneNumberInstance
-
update(is_reserved=<object object>)[source]¶ Update the PhoneNumberInstance
Parameters: is_reserved (bool) – Whether the new phone number should be reserved Returns: The updated PhoneNumberInstance Return type: twilio.rest.proxy.v1.service.phone_number.PhoneNumberInstance
-
-
class
twilio.rest.proxy.v1.service.phone_number.PhoneNumberInstance(version, payload, service_sid, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResourcePLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
account_sid¶ Returns: The SID of the Account that created the resource Return type: unicode
-
capabilities¶ Returns: The capabilities of the phone number Return type: unicode
-
date_created¶ Returns: The ISO 8601 date and time in GMT when the resource was created Return type: datetime
-
date_updated¶ Returns: The ISO 8601 date and time in GMT when the resource was last updated Return type: datetime
-
delete()[source]¶ Deletes the PhoneNumberInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch()[source]¶ Fetch the PhoneNumberInstance
Returns: The fetched PhoneNumberInstance Return type: twilio.rest.proxy.v1.service.phone_number.PhoneNumberInstance
-
friendly_name¶ Returns: The string that you assigned to describe the resource Return type: unicode
-
in_use¶ Returns: The number of open session assigned to the number. Return type: unicode
-
is_reserved¶ Returns: Reserve the phone number for manual assignment to participants only Return type: bool
-
iso_country¶ Returns: The ISO Country Code Return type: unicode
-
phone_number¶ Returns: The phone number in E.164 format Return type: unicode
-
service_sid¶ Returns: The SID of the PhoneNumber resource’s parent Service resource Return type: unicode
-
sid¶ Returns: The unique string that identifies the resource Return type: unicode
-
update(is_reserved=<object object>)[source]¶ Update the PhoneNumberInstance
Parameters: is_reserved (bool) – Whether the new phone number should be reserved Returns: The updated PhoneNumberInstance Return type: twilio.rest.proxy.v1.service.phone_number.PhoneNumberInstance
-
url¶ Returns: The absolute URL of the PhoneNumber resource Return type: unicode
-
-
class
twilio.rest.proxy.v1.service.phone_number.PhoneNumberList(version, service_sid)[source]¶ Bases:
twilio.base.list_resource.ListResourcePLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
create(sid=<object object>, phone_number=<object object>, is_reserved=<object object>)[source]¶ Create the PhoneNumberInstance
Parameters: - sid (unicode) – The SID of a Twilio IncomingPhoneNumber resource
- phone_number (unicode) – The phone number in E.164 format
- is_reserved (bool) – Whether the new phone number should be reserved
Returns: The created PhoneNumberInstance
Return type: twilio.rest.proxy.v1.service.phone_number.PhoneNumberInstance
-
get(sid)[source]¶ Constructs a PhoneNumberContext
Parameters: sid – The unique string that identifies the resource Returns: twilio.rest.proxy.v1.service.phone_number.PhoneNumberContext Return type: twilio.rest.proxy.v1.service.phone_number.PhoneNumberContext
-
get_page(target_url)[source]¶ Retrieve a specific page of PhoneNumberInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of PhoneNumberInstance Return type: twilio.rest.proxy.v1.service.phone_number.PhoneNumberPage
-
list(limit=None, page_size=None)[source]¶ Lists PhoneNumberInstance 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.proxy.v1.service.phone_number.PhoneNumberInstance]
-
page(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of PhoneNumberInstance records from the API. Request is executed immediately
Parameters: Returns: Page of PhoneNumberInstance
Return type:
-
stream(limit=None, page_size=None)[source]¶ Streams PhoneNumberInstance 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.proxy.v1.service.phone_number.PhoneNumberInstance]
-
-
class
twilio.rest.proxy.v1.service.phone_number.PhoneNumberPage(version, response, solution)[source]¶ Bases:
twilio.base.page.PagePLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
get_instance(payload)[source]¶ Build an instance of PhoneNumberInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.proxy.v1.service.phone_number.PhoneNumberInstance Return type: twilio.rest.proxy.v1.service.phone_number.PhoneNumberInstance
-
twilio.rest.proxy.v1.service.short_code module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.proxy.v1.service.short_code.ShortCodeContext(version, service_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContextPLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
delete()[source]¶ Deletes the ShortCodeInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch()[source]¶ Fetch the ShortCodeInstance
Returns: The fetched ShortCodeInstance Return type: twilio.rest.proxy.v1.service.short_code.ShortCodeInstance
-
update(is_reserved=<object object>)[source]¶ Update the ShortCodeInstance
Parameters: is_reserved (bool) – Whether the short code should be reserved for manual assignment to participants only Returns: The updated ShortCodeInstance Return type: twilio.rest.proxy.v1.service.short_code.ShortCodeInstance
-
-
class
twilio.rest.proxy.v1.service.short_code.ShortCodeInstance(version, payload, service_sid, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResourcePLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
account_sid¶ Returns: The SID of the Account that created the resource Return type: unicode
-
capabilities¶ Returns: The capabilities of the short code Return type: unicode
-
date_created¶ Returns: The ISO 8601 date and time in GMT when the resource was created Return type: datetime
-
date_updated¶ Returns: The ISO 8601 date and time in GMT when the resource was last updated Return type: datetime
-
delete()[source]¶ Deletes the ShortCodeInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch()[source]¶ Fetch the ShortCodeInstance
Returns: The fetched ShortCodeInstance Return type: twilio.rest.proxy.v1.service.short_code.ShortCodeInstance
-
is_reserved¶ Returns: Whether the short code should be reserved for manual assignment to participants only Return type: bool
-
iso_country¶ Returns: The ISO Country Code Return type: unicode
-
service_sid¶ Returns: The SID of the resource’s parent Service Return type: unicode
-
short_code¶ Returns: The short code’s number Return type: unicode
-
sid¶ Returns: The unique string that identifies the resource Return type: unicode
-
update(is_reserved=<object object>)[source]¶ Update the ShortCodeInstance
Parameters: is_reserved (bool) – Whether the short code should be reserved for manual assignment to participants only Returns: The updated ShortCodeInstance Return type: twilio.rest.proxy.v1.service.short_code.ShortCodeInstance
-
url¶ Returns: The absolute URL of the ShortCode resource Return type: unicode
-
-
class
twilio.rest.proxy.v1.service.short_code.ShortCodeList(version, service_sid)[source]¶ Bases:
twilio.base.list_resource.ListResourcePLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
create(sid)[source]¶ Create the ShortCodeInstance
Parameters: sid (unicode) – The SID of a Twilio ShortCode resource Returns: The created ShortCodeInstance Return type: twilio.rest.proxy.v1.service.short_code.ShortCodeInstance
-
get(sid)[source]¶ Constructs a ShortCodeContext
Parameters: sid – The unique string that identifies the resource Returns: twilio.rest.proxy.v1.service.short_code.ShortCodeContext Return type: twilio.rest.proxy.v1.service.short_code.ShortCodeContext
-
get_page(target_url)[source]¶ Retrieve a specific page of ShortCodeInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of ShortCodeInstance Return type: twilio.rest.proxy.v1.service.short_code.ShortCodePage
-
list(limit=None, page_size=None)[source]¶ Lists ShortCodeInstance 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.proxy.v1.service.short_code.ShortCodeInstance]
-
page(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of ShortCodeInstance records from the API. Request is executed immediately
Parameters: Returns: Page of ShortCodeInstance
Return type:
-
stream(limit=None, page_size=None)[source]¶ Streams ShortCodeInstance 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.proxy.v1.service.short_code.ShortCodeInstance]
-
-
class
twilio.rest.proxy.v1.service.short_code.ShortCodePage(version, response, solution)[source]¶ Bases:
twilio.base.page.PagePLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
get_instance(payload)[source]¶ Build an instance of ShortCodeInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.proxy.v1.service.short_code.ShortCodeInstance Return type: twilio.rest.proxy.v1.service.short_code.ShortCodeInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.proxy.v1.service.ServiceContext(version, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContextPLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
delete()[source]¶ Deletes the ServiceInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch()[source]¶ Fetch the ServiceInstance
Returns: The fetched ServiceInstance Return type: twilio.rest.proxy.v1.service.ServiceInstance
-
phone_numbers¶ Access the phone_numbers
Returns: twilio.rest.proxy.v1.service.phone_number.PhoneNumberList Return type: twilio.rest.proxy.v1.service.phone_number.PhoneNumberList
-
sessions¶ Access the sessions
Returns: twilio.rest.proxy.v1.service.session.SessionList Return type: twilio.rest.proxy.v1.service.session.SessionList
-
short_codes¶ Access the short_codes
Returns: twilio.rest.proxy.v1.service.short_code.ShortCodeList Return type: twilio.rest.proxy.v1.service.short_code.ShortCodeList
-
update(unique_name=<object object>, default_ttl=<object object>, callback_url=<object object>, geo_match_level=<object object>, number_selection_behavior=<object object>, intercept_callback_url=<object object>, out_of_session_callback_url=<object object>, chat_instance_sid=<object object>)[source]¶ Update the ServiceInstance
Parameters: - unique_name (unicode) – An application-defined string that uniquely identifies the resource
- default_ttl (unicode) – Default TTL for a Session, in seconds
- callback_url (unicode) – The URL we should call when the interaction status changes
- geo_match_level (ServiceInstance.GeoMatchLevel) – Where a proxy number must be located relative to the participant identifier
- number_selection_behavior (ServiceInstance.NumberSelectionBehavior) – The preference for Proxy Number selection for the Service instance
- intercept_callback_url (unicode) – The URL we call on each interaction
- out_of_session_callback_url (unicode) – The URL we call when an inbound call or SMS action occurs on a closed or non-existent Session
- chat_instance_sid (unicode) – The SID of the Chat Service Instance
Returns: The updated ServiceInstance
Return type:
-
-
class
twilio.rest.proxy.v1.service.ServiceInstance(version, payload, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResourcePLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
class
GeoMatchLevel[source]¶ Bases:
object-
AREA_CODE= 'area-code'¶
-
COUNTRY= 'country'¶
-
OVERLAY= 'overlay'¶
-
RADIUS= 'radius'¶
-
-
class
NumberSelectionBehavior[source]¶ Bases:
object-
AVOID_STICKY= 'avoid-sticky'¶
-
PREFER_STICKY= 'prefer-sticky'¶
-
-
account_sid¶ Returns: The SID of the Account that created the resource Return type: unicode
-
callback_url¶ Returns: The URL we call when the interaction status changes Return type: unicode
-
chat_instance_sid¶ Returns: The SID of the Chat Service Instance Return type: unicode
-
date_created¶ Returns: The ISO 8601 date and time in GMT when the resource was created Return type: datetime
-
date_updated¶ Returns: The ISO 8601 date and time in GMT when the resource was last updated Return type: datetime
-
default_ttl¶ Returns: Default TTL for a Session, in seconds Return type: unicode
-
delete()[source]¶ Deletes the ServiceInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch()[source]¶ Fetch the ServiceInstance
Returns: The fetched ServiceInstance Return type: twilio.rest.proxy.v1.service.ServiceInstance
-
geo_match_level¶ Returns: Where a proxy number must be located relative to the participant identifier Return type: ServiceInstance.GeoMatchLevel
-
intercept_callback_url¶ Returns: The URL we call on each interaction Return type: unicode
-
links¶ Returns: The URLs of resources related to the Service Return type: unicode
-
number_selection_behavior¶ Returns: The preference for Proxy Number selection for the Service instance Return type: ServiceInstance.NumberSelectionBehavior
-
out_of_session_callback_url¶ Returns: The URL we call when an inbound call or SMS action occurs on a closed or non-existent Session Return type: unicode
-
phone_numbers¶ Access the phone_numbers
Returns: twilio.rest.proxy.v1.service.phone_number.PhoneNumberList Return type: twilio.rest.proxy.v1.service.phone_number.PhoneNumberList
-
sessions¶ Access the sessions
Returns: twilio.rest.proxy.v1.service.session.SessionList Return type: twilio.rest.proxy.v1.service.session.SessionList
-
short_codes¶ Access the short_codes
Returns: twilio.rest.proxy.v1.service.short_code.ShortCodeList Return type: twilio.rest.proxy.v1.service.short_code.ShortCodeList
-
sid¶ Returns: The unique string that identifies the resource Return type: unicode
-
unique_name¶ Returns: An application-defined string that uniquely identifies the resource Return type: unicode
-
update(unique_name=<object object>, default_ttl=<object object>, callback_url=<object object>, geo_match_level=<object object>, number_selection_behavior=<object object>, intercept_callback_url=<object object>, out_of_session_callback_url=<object object>, chat_instance_sid=<object object>)[source]¶ Update the ServiceInstance
Parameters: - unique_name (unicode) – An application-defined string that uniquely identifies the resource
- default_ttl (unicode) – Default TTL for a Session, in seconds
- callback_url (unicode) – The URL we should call when the interaction status changes
- geo_match_level (ServiceInstance.GeoMatchLevel) – Where a proxy number must be located relative to the participant identifier
- number_selection_behavior (ServiceInstance.NumberSelectionBehavior) – The preference for Proxy Number selection for the Service instance
- intercept_callback_url (unicode) – The URL we call on each interaction
- out_of_session_callback_url (unicode) – The URL we call when an inbound call or SMS action occurs on a closed or non-existent Session
- chat_instance_sid (unicode) – The SID of the Chat Service Instance
Returns: The updated ServiceInstance
Return type:
-
url¶ Returns: The absolute URL of the Service resource Return type: unicode
-
class
-
class
twilio.rest.proxy.v1.service.ServiceList(version)[source]¶ Bases:
twilio.base.list_resource.ListResourcePLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
create(unique_name, default_ttl=<object object>, callback_url=<object object>, geo_match_level=<object object>, number_selection_behavior=<object object>, intercept_callback_url=<object object>, out_of_session_callback_url=<object object>, chat_instance_sid=<object object>)[source]¶ Create the ServiceInstance
Parameters: - unique_name (unicode) – An application-defined string that uniquely identifies the resource
- default_ttl (unicode) – Default TTL for a Session, in seconds
- callback_url (unicode) – The URL we should call when the interaction status changes
- geo_match_level (ServiceInstance.GeoMatchLevel) – Where a proxy number must be located relative to the participant identifier
- number_selection_behavior (ServiceInstance.NumberSelectionBehavior) – The preference for Proxy Number selection for the Service instance
- intercept_callback_url (unicode) – The URL we call on each interaction
- out_of_session_callback_url (unicode) – The URL we call when an inbound call or SMS action occurs on a closed or non-existent Session
- chat_instance_sid (unicode) – The SID of the Chat Service Instance
Returns: The created ServiceInstance
Return type:
-
get(sid)[source]¶ Constructs a ServiceContext
Parameters: sid – The unique string that identifies the resource Returns: twilio.rest.proxy.v1.service.ServiceContext Return type: twilio.rest.proxy.v1.service.ServiceContext
-
get_page(target_url)[source]¶ Retrieve a specific page of ServiceInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of ServiceInstance Return type: twilio.rest.proxy.v1.service.ServicePage
-
list(limit=None, page_size=None)[source]¶ Lists ServiceInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type:
-
page(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of ServiceInstance records from the API. Request is executed immediately
Parameters: Returns: Page of ServiceInstance
Return type:
-
stream(limit=None, page_size=None)[source]¶ Streams ServiceInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.
Parameters: - limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type:
-
-
class
twilio.rest.proxy.v1.service.ServicePage(version, response, solution)[source]¶ Bases:
twilio.base.page.PagePLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
get_instance(payload)[source]¶ Build an instance of ServiceInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.proxy.v1.service.ServiceInstance Return type: twilio.rest.proxy.v1.service.ServiceInstance
-