twilio.rest.messaging.v1.service package¶
Submodules¶
twilio.rest.messaging.v1.service.alpha_sender module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderContext(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 AlphaSenderInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch()[source]¶ Fetch the AlphaSenderInstance
Returns: The fetched AlphaSenderInstance Return type: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderInstance
-
-
class
twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderInstance(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
-
alpha_sender¶ Returns: The Alphanumeric Sender ID string Return type: unicode
-
capabilities¶ Returns: An array of values that describe whether the number can receive calls or messages Return type: list[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 AlphaSenderInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch()[source]¶ Fetch the AlphaSenderInstance
Returns: The fetched AlphaSenderInstance Return type: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderInstance
-
service_sid¶ Returns: The SID of the Service that the resource is associated with Return type: unicode
-
sid¶ Returns: The unique string that identifies the resource Return type: unicode
-
url¶ Returns: The absolute URL of the AlphaSender resource Return type: unicode
-
-
class
twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderList(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(alpha_sender)[source]¶ Create the AlphaSenderInstance
Parameters: alpha_sender (unicode) – The Alphanumeric Sender ID string Returns: The created AlphaSenderInstance Return type: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderInstance
-
get(sid)[source]¶ Constructs a AlphaSenderContext
Parameters: sid – The SID that identifies the resource to fetch Returns: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderContext Return type: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderContext
-
get_page(target_url)[source]¶ Retrieve a specific page of AlphaSenderInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of AlphaSenderInstance Return type: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderPage
-
list(limit=None, page_size=None)[source]¶ Lists AlphaSenderInstance 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.messaging.v1.service.alpha_sender.AlphaSenderInstance]
-
page(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of AlphaSenderInstance records from the API. Request is executed immediately
Parameters: Returns: Page of AlphaSenderInstance
Return type: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderPage
-
stream(limit=None, page_size=None)[source]¶ Streams AlphaSenderInstance 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.messaging.v1.service.alpha_sender.AlphaSenderInstance]
-
-
class
twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderPage(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 AlphaSenderInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderInstance Return type: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderInstance
-
twilio.rest.messaging.v1.service.phone_number module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.messaging.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.messaging.v1.service.phone_number.PhoneNumberInstance
-
-
class
twilio.rest.messaging.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: An array of values that describe whether the number can receive calls or messages Return type: list[unicode]
-
country_code¶ Returns: The 2-character ISO Country Code of the 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.messaging.v1.service.phone_number.PhoneNumberInstance
-
phone_number¶ Returns: The phone number in E.164 format Return type: unicode
-
service_sid¶ Returns: The SID of the Service that the resource is associated with Return type: unicode
-
sid¶ Returns: The unique string that identifies the resource Return type: unicode
-
url¶ Returns: The absolute URL of the PhoneNumber resource Return type: unicode
-
-
class
twilio.rest.messaging.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(phone_number_sid)[source]¶ Create the PhoneNumberInstance
Parameters: phone_number_sid (unicode) – The SID of the Phone Number being added to the Service Returns: The created PhoneNumberInstance Return type: twilio.rest.messaging.v1.service.phone_number.PhoneNumberInstance
-
get(sid)[source]¶ Constructs a PhoneNumberContext
Parameters: sid – The SID that identifies the resource to fetch Returns: twilio.rest.messaging.v1.service.phone_number.PhoneNumberContext Return type: twilio.rest.messaging.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.messaging.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.messaging.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: twilio.rest.messaging.v1.service.phone_number.PhoneNumberPage
-
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.messaging.v1.service.phone_number.PhoneNumberInstance]
-
-
class
twilio.rest.messaging.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.messaging.v1.service.phone_number.PhoneNumberInstance Return type: twilio.rest.messaging.v1.service.phone_number.PhoneNumberInstance
-
twilio.rest.messaging.v1.service.short_code module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.messaging.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.messaging.v1.service.short_code.ShortCodeInstance
-
-
class
twilio.rest.messaging.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: An array of values that describe whether the number can receive calls or messages Return type: list[unicode]
-
country_code¶ Returns: The 2-character ISO Country Code of the 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 ShortCodeInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch()[source]¶ Fetch the ShortCodeInstance
Returns: The fetched ShortCodeInstance Return type: twilio.rest.messaging.v1.service.short_code.ShortCodeInstance
-
service_sid¶ Returns: The SID of the Service that the resource is associated with Return type: unicode
-
short_code¶ Returns: The E.164 format of the short code Return type: unicode
-
sid¶ Returns: The unique string that identifies the resource Return type: unicode
-
url¶ Returns: The absolute URL of the ShortCode resource Return type: unicode
-
-
class
twilio.rest.messaging.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(short_code_sid)[source]¶ Create the ShortCodeInstance
Parameters: short_code_sid (unicode) – The SID of the ShortCode being added to the Service Returns: The created ShortCodeInstance Return type: twilio.rest.messaging.v1.service.short_code.ShortCodeInstance
-
get(sid)[source]¶ Constructs a ShortCodeContext
Parameters: sid – The SID that identifies the resource to fetch Returns: twilio.rest.messaging.v1.service.short_code.ShortCodeContext Return type: twilio.rest.messaging.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.messaging.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.messaging.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.messaging.v1.service.short_code.ShortCodeInstance]
-
-
class
twilio.rest.messaging.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.messaging.v1.service.short_code.ShortCodeInstance Return type: twilio.rest.messaging.v1.service.short_code.ShortCodeInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.messaging.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.
-
alpha_senders¶ Access the alpha_senders
Returns: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderList Return type: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderList
-
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.messaging.v1.service.ServiceInstance
-
phone_numbers¶ Access the phone_numbers
Returns: twilio.rest.messaging.v1.service.phone_number.PhoneNumberList Return type: twilio.rest.messaging.v1.service.phone_number.PhoneNumberList
-
short_codes¶ Access the short_codes
Returns: twilio.rest.messaging.v1.service.short_code.ShortCodeList Return type: twilio.rest.messaging.v1.service.short_code.ShortCodeList
-
update(friendly_name=<object object>, inbound_request_url=<object object>, inbound_method=<object object>, fallback_url=<object object>, fallback_method=<object object>, status_callback=<object object>, sticky_sender=<object object>, mms_converter=<object object>, smart_encoding=<object object>, scan_message_content=<object object>, fallback_to_long_code=<object object>, area_code_geomatch=<object object>, validity_period=<object object>, synchronous_validation=<object object>)[source]¶ Update the ServiceInstance
Parameters: - friendly_name (unicode) – A string to describe the resource
- inbound_request_url (unicode) – The URL we call using inbound_method when a message is received by any phone number or short code in the Service
- inbound_method (unicode) – The HTTP method we should use to call inbound_request_url
- fallback_url (unicode) – The URL that we call using fallback_method if an error occurs while retrieving or executing the TwiML from the Inbound Request URL
- fallback_method (unicode) – The HTTP method we should use to call fallback_url
- status_callback (unicode) – The URL we should call to pass status updates about message delivery
- sticky_sender (bool) – Whether to enable Sticky Sender on the Service instance
- mms_converter (bool) – Whether to enable the MMS Converter for messages sent through the Service instance
- smart_encoding (bool) – Whether to enable Encoding for messages sent through the Service instance
- scan_message_content (ServiceInstance.ScanMessageContent) – Reserved
- fallback_to_long_code (bool) – Whether to enable Fallback to Long Code for messages sent through the Service instance
- area_code_geomatch (bool) – Whether to enable Area Code Geomatch on the Service Instance
- validity_period (unicode) – How long, in seconds, messages sent from the Service are valid
- synchronous_validation (bool) – Reserved
Returns: The updated ServiceInstance
Return type:
-
-
class
twilio.rest.messaging.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
ScanMessageContent[source]¶ Bases:
object-
DISABLE= 'disable'¶
-
ENABLE= 'enable'¶
-
INHERIT= 'inherit'¶
-
-
account_sid¶ Returns: The SID of the Account that created the resource Return type: unicode
-
alpha_senders¶ Access the alpha_senders
Returns: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderList Return type: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderList
-
area_code_geomatch¶ Returns: Whether to enable Area Code Geomatch on the Service Instance Return type: bool
-
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 ServiceInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fallback_method¶ Returns: The HTTP method we use to call fallback_url Return type: unicode
-
fallback_to_long_code¶ Returns: Whether to enable Fallback to Long Code for messages sent through the Service instance Return type: bool
-
fallback_url¶ Returns: The URL that we call using fallback_method if an error occurs while retrieving or executing the TwiML from the Inbound Request URL Return type: unicode
-
fetch()[source]¶ Fetch the ServiceInstance
Returns: The fetched ServiceInstance Return type: twilio.rest.messaging.v1.service.ServiceInstance
-
friendly_name¶ Returns: The string that you assigned to describe the resource Return type: unicode
-
inbound_method¶ Returns: The HTTP method we use to call inbound_request_url Return type: unicode
-
inbound_request_url¶ Returns: The URL we call using inbound_method when a message is received by any phone number or short code in the Service Return type: unicode
-
links¶ Returns: The absolute URLs of related resources Return type: unicode
-
mms_converter¶ Returns: Whether to enable the MMS Converter for messages sent through the Service instance Return type: bool
-
phone_numbers¶ Access the phone_numbers
Returns: twilio.rest.messaging.v1.service.phone_number.PhoneNumberList Return type: twilio.rest.messaging.v1.service.phone_number.PhoneNumberList
-
scan_message_content¶ Returns: Reserved Return type: ServiceInstance.ScanMessageContent
-
short_codes¶ Access the short_codes
Returns: twilio.rest.messaging.v1.service.short_code.ShortCodeList Return type: twilio.rest.messaging.v1.service.short_code.ShortCodeList
-
sid¶ Returns: The unique string that identifies the resource Return type: unicode
-
smart_encoding¶ Returns: Whether to enable Encoding for messages sent through the Service instance Return type: bool
-
status_callback¶ Returns: The URL we call to pass status updates about message delivery Return type: unicode
-
update(friendly_name=<object object>, inbound_request_url=<object object>, inbound_method=<object object>, fallback_url=<object object>, fallback_method=<object object>, status_callback=<object object>, sticky_sender=<object object>, mms_converter=<object object>, smart_encoding=<object object>, scan_message_content=<object object>, fallback_to_long_code=<object object>, area_code_geomatch=<object object>, validity_period=<object object>, synchronous_validation=<object object>)[source]¶ Update the ServiceInstance
Parameters: - friendly_name (unicode) – A string to describe the resource
- inbound_request_url (unicode) – The URL we call using inbound_method when a message is received by any phone number or short code in the Service
- inbound_method (unicode) – The HTTP method we should use to call inbound_request_url
- fallback_url (unicode) – The URL that we call using fallback_method if an error occurs while retrieving or executing the TwiML from the Inbound Request URL
- fallback_method (unicode) – The HTTP method we should use to call fallback_url
- status_callback (unicode) – The URL we should call to pass status updates about message delivery
- sticky_sender (bool) – Whether to enable Sticky Sender on the Service instance
- mms_converter (bool) – Whether to enable the MMS Converter for messages sent through the Service instance
- smart_encoding (bool) – Whether to enable Encoding for messages sent through the Service instance
- scan_message_content (ServiceInstance.ScanMessageContent) – Reserved
- fallback_to_long_code (bool) – Whether to enable Fallback to Long Code for messages sent through the Service instance
- area_code_geomatch (bool) – Whether to enable Area Code Geomatch on the Service Instance
- validity_period (unicode) – How long, in seconds, messages sent from the Service are valid
- synchronous_validation (bool) – Reserved
Returns: The updated ServiceInstance
Return type:
-
url¶ Returns: The absolute URL of the Service resource Return type: unicode
-
validity_period¶ Returns: How long, in seconds, messages sent from the Service are valid Return type: unicode
-
class
-
class
twilio.rest.messaging.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(friendly_name, inbound_request_url=<object object>, inbound_method=<object object>, fallback_url=<object object>, fallback_method=<object object>, status_callback=<object object>, sticky_sender=<object object>, mms_converter=<object object>, smart_encoding=<object object>, scan_message_content=<object object>, fallback_to_long_code=<object object>, area_code_geomatch=<object object>, validity_period=<object object>, synchronous_validation=<object object>)[source]¶ Create the ServiceInstance
Parameters: - friendly_name (unicode) – A string to describe the resource
- inbound_request_url (unicode) – The URL we call using inbound_method when a message is received by any phone number or short code in the Service
- inbound_method (unicode) – The HTTP method we should use to call inbound_request_url
- fallback_url (unicode) – The URL that we call using fallback_method if an error occurs while retrieving or executing the TwiML from the Inbound Request URL
- fallback_method (unicode) – The HTTP method we should use to call fallback_url
- status_callback (unicode) – The URL we should call to pass status updates about message delivery
- sticky_sender (bool) – Whether to enable Sticky Sender on the Service instance
- mms_converter (bool) – Whether to enable the MMS Converter for messages sent through the Service instance
- smart_encoding (bool) – Whether to enable Encoding for messages sent through the Service instance
- scan_message_content (ServiceInstance.ScanMessageContent) – Reserved
- fallback_to_long_code (bool) – Whether to enable Fallback to Long Code for messages sent through the Service instance
- area_code_geomatch (bool) – Whether to enable Area Code Geomatch on the Service Instance
- validity_period (unicode) – How long, in seconds, messages sent from the Service are valid
- synchronous_validation (bool) – Reserved
Returns: The created ServiceInstance
Return type:
-
get(sid)[source]¶ Constructs a ServiceContext
Parameters: sid – The SID that identifies the resource to fetch Returns: twilio.rest.messaging.v1.service.ServiceContext Return type: twilio.rest.messaging.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.messaging.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.messaging.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.messaging.v1.service.ServiceInstance Return type: twilio.rest.messaging.v1.service.ServiceInstance
-