twilio.rest.notify.v1.service package¶
Submodules¶
twilio.rest.notify.v1.service.binding module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.notify.v1.service.binding.
BindingContext
(version, service_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
delete
()[source]¶ Deletes the BindingInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the BindingInstance
Returns: The fetched BindingInstance Return type: twilio.rest.notify.v1.service.binding.BindingInstance
-
-
class
twilio.rest.notify.v1.service.binding.
BindingInstance
(version, payload, service_sid, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
class
BindingType
[source]¶ Bases:
object
-
ALEXA
= 'alexa'¶
-
APN
= 'apn'¶
-
FACEBOOK_MESSENGER
= 'facebook-messenger'¶
-
FCM
= 'fcm'¶
-
GCM
= 'gcm'¶
-
SMS
= 'sms'¶
-
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
address
¶ Returns: The channel-specific address Return type: unicode
-
binding_type
¶ Returns: The type of the Binding Return type: unicode
-
credential_sid
¶ Returns: The SID of the Credential resource to be used to send notifications to this Binding Return type: unicode
-
date_created
¶ Returns: The RFC 2822 date and time in GMT when the resource was created Return type: datetime
-
date_updated
¶ Returns: The RFC 2822 date and time in GMT when the resource was last updated Return type: datetime
-
delete
()[source]¶ Deletes the BindingInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
endpoint
¶ Returns: Deprecated Return type: unicode
-
fetch
()[source]¶ Fetch the BindingInstance
Returns: The fetched BindingInstance Return type: twilio.rest.notify.v1.service.binding.BindingInstance
-
identity
¶ Returns: The identity value that identifies the new resource’s User Return type: unicode
-
links
¶ Returns: The URLs of related resources Return type: unicode
-
notification_protocol_version
¶ Returns: The protocol version to use to send the notification 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
Returns: The list of tags associated with this Binding Return type: list[unicode]
-
url
¶ Returns: The absolute URL of the Binding resource Return type: unicode
-
class
-
class
twilio.rest.notify.v1.service.binding.
BindingList
(version, service_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
create
(identity, binding_type, address, tag=<object object>, notification_protocol_version=<object object>, credential_sid=<object object>, endpoint=<object object>)[source]¶ Create the BindingInstance
Parameters: - identity (unicode) – The identity value that identifies the new resource’s User
- binding_type (BindingInstance.BindingType) – The type of the Binding
- address (unicode) – The channel-specific address
- tag (list[unicode]) – A tag that can be used to select the Bindings to notify
- notification_protocol_version (unicode) – The protocol version to use to send the notification
- credential_sid (unicode) – The SID of the Credential resource to be used to send notifications to this Binding
- endpoint (unicode) – Deprecated
Returns: The created BindingInstance
Return type:
-
get
(sid)[source]¶ Constructs a BindingContext
Parameters: sid – The unique string that identifies the resource Returns: twilio.rest.notify.v1.service.binding.BindingContext Return type: twilio.rest.notify.v1.service.binding.BindingContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of BindingInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of BindingInstance Return type: twilio.rest.notify.v1.service.binding.BindingPage
-
list
(start_date=<object object>, end_date=<object object>, identity=<object object>, tag=<object object>, limit=None, page_size=None)[source]¶ Lists BindingInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - start_date (date) – Only include usage that has occurred on or after this date
- end_date (date) – Only include usage that occurred on or before this date
- identity (list[unicode]) – The identity value of the resources to read
- tag (list[unicode]) – Only list Bindings that have all of the specified Tags
- 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
(start_date=<object object>, end_date=<object object>, identity=<object object>, tag=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of BindingInstance records from the API. Request is executed immediately
Parameters: - start_date (date) – Only include usage that has occurred on or after this date
- end_date (date) – Only include usage that occurred on or before this date
- identity (list[unicode]) – The identity value of the resources to read
- tag (list[unicode]) – Only list Bindings that have all of the specified Tags
- 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 BindingInstance
Return type:
-
stream
(start_date=<object object>, end_date=<object object>, identity=<object object>, tag=<object object>, limit=None, page_size=None)[source]¶ Streams BindingInstance 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: - start_date (date) – Only include usage that has occurred on or after this date
- end_date (date) – Only include usage that occurred on or before this date
- identity (list[unicode]) – The identity value of the resources to read
- tag (list[unicode]) – Only list Bindings that have all of the specified Tags
- 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.notify.v1.service.binding.
BindingPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
get_instance
(payload)[source]¶ Build an instance of BindingInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.notify.v1.service.binding.BindingInstance Return type: twilio.rest.notify.v1.service.binding.BindingInstance
-
twilio.rest.notify.v1.service.notification module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.notify.v1.service.notification.
NotificationInstance
(version, payload, service_sid)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
PLEASE 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
-
action
¶ Returns: The actions to display for the notification Return type: unicode
-
apn
¶ Returns: The APNS-specific payload that overrides corresponding attributes in a generic payload for APNS Bindings Return type: dict
-
body
¶ Returns: The notification body text Return type: unicode
-
date_created
¶ Returns: The RFC 2822 date and time in GMT when the resource was created Return type: datetime
-
fcm
¶ Returns: The FCM-specific payload that overrides corresponding attributes in generic payload for FCM Bindings Return type: dict
-
gcm
¶ Returns: The GCM-specific payload that overrides corresponding attributes in generic payload for GCM Bindings Return type: dict
-
priority
¶ Returns: The priority of the notification Return type: NotificationInstance.Priority
-
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
-
sms
¶ Returns: The SMS-specific payload that overrides corresponding attributes in generic payload for SMS Bindings Return type: dict
-
sound
¶ Returns: The name of the sound to be played for the notification Return type: unicode
Returns: The tags that select the Bindings to notify Return type: list[unicode]
-
title
¶ Returns: The notification title Return type: unicode
-
ttl
¶ Returns: How long, in seconds, the notification is valid Return type: unicode
-
-
class
twilio.rest.notify.v1.service.notification.
NotificationList
(version, service_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
create
(body=<object object>, priority=<object object>, ttl=<object object>, title=<object object>, sound=<object object>, action=<object object>, data=<object object>, apn=<object object>, gcm=<object object>, sms=<object object>, facebook_messenger=<object object>, fcm=<object object>, segment=<object object>, alexa=<object object>, to_binding=<object object>, delivery_callback_url=<object object>, identity=<object object>, tag=<object object>)[source]¶ Create the NotificationInstance
Parameters: - body (unicode) – The notification body text
- priority (NotificationInstance.Priority) – The priority of the notification
- ttl (unicode) – How long, in seconds, the notification is valid
- title (unicode) – The notification title
- sound (unicode) – The name of the sound to be played for the notification
- action (unicode) – The actions to display for the notification
- data (dict) – The custom key-value pairs of the notification’s payload
- apn (dict) – The APNS-specific payload that overrides corresponding attributes in a generic payload for APNS Bindings
- gcm (dict) – The GCM-specific payload that overrides corresponding attributes in generic payload for GCM Bindings
- sms (dict) – The SMS-specific payload that overrides corresponding attributes in generic payload for SMS Bindings
- facebook_messenger (dict) – Deprecated
- fcm (dict) – The FCM-specific payload that overrides corresponding attributes in generic payload for FCM Bindings
- segment (list[unicode]) – A Segment to notify
- alexa (dict) – Deprecated
- to_binding (list[unicode]) – The destination address specified as a JSON string
- delivery_callback_url (unicode) – URL to send webhooks
- identity (list[unicode]) – The identity value that identifies the new resource’s User
- tag (list[unicode]) – A tag that selects the Bindings to notify
Returns: The created NotificationInstance
Return type: twilio.rest.notify.v1.service.notification.NotificationInstance
-
-
class
twilio.rest.notify.v1.service.notification.
NotificationPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
get_instance
(payload)[source]¶ Build an instance of NotificationInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.notify.v1.service.notification.NotificationInstance Return type: twilio.rest.notify.v1.service.notification.NotificationInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.notify.v1.service.
ServiceContext
(version, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
bindings
¶ Access the bindings
Returns: twilio.rest.notify.v1.service.binding.BindingList Return type: twilio.rest.notify.v1.service.binding.BindingList
-
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.notify.v1.service.ServiceInstance
-
notifications
¶ Access the notifications
Returns: twilio.rest.notify.v1.service.notification.NotificationList Return type: twilio.rest.notify.v1.service.notification.NotificationList
-
update
(friendly_name=<object object>, apn_credential_sid=<object object>, gcm_credential_sid=<object object>, messaging_service_sid=<object object>, facebook_messenger_page_id=<object object>, default_apn_notification_protocol_version=<object object>, default_gcm_notification_protocol_version=<object object>, fcm_credential_sid=<object object>, default_fcm_notification_protocol_version=<object object>, log_enabled=<object object>, alexa_skill_id=<object object>, default_alexa_notification_protocol_version=<object object>, delivery_callback_url=<object object>, delivery_callback_enabled=<object object>)[source]¶ Update the ServiceInstance
Parameters: - friendly_name (unicode) – A string to describe the resource
- apn_credential_sid (unicode) – The SID of the Credential to use for APN Bindings
- gcm_credential_sid (unicode) – The SID of the Credential to use for GCM Bindings
- messaging_service_sid (unicode) – The SID of the Messaging Service to use for SMS Bindings
- facebook_messenger_page_id (unicode) – Deprecated
- default_apn_notification_protocol_version (unicode) – The protocol version to use for sending APNS notifications
- default_gcm_notification_protocol_version (unicode) – The protocol version to use for sending GCM notifications
- fcm_credential_sid (unicode) – The SID of the Credential to use for FCM Bindings
- default_fcm_notification_protocol_version (unicode) – The protocol version to use for sending FCM notifications
- log_enabled (bool) – Whether to log notifications
- alexa_skill_id (unicode) – Deprecated
- default_alexa_notification_protocol_version (unicode) – Deprecated
- delivery_callback_url (unicode) – Webhook URL
- delivery_callback_enabled (bool) – Enable delivery callbacks
Returns: The updated ServiceInstance
Return type:
-
-
class
twilio.rest.notify.v1.service.
ServiceInstance
(version, payload, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
PLEASE 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
-
alexa_skill_id
¶ Returns: Deprecated Return type: unicode
-
apn_credential_sid
¶ Returns: The SID of the Credential to use for APN Bindings Return type: unicode
-
bindings
¶ Access the bindings
Returns: twilio.rest.notify.v1.service.binding.BindingList Return type: twilio.rest.notify.v1.service.binding.BindingList
-
date_created
¶ Returns: The RFC 2822 date and time in GMT when the resource was created Return type: datetime
-
date_updated
¶ Returns: The RFC 2822 date and time in GMT when the resource was last updated Return type: datetime
-
default_alexa_notification_protocol_version
¶ Returns: Deprecated Return type: unicode
-
default_apn_notification_protocol_version
¶ Returns: The protocol version to use for sending APNS notifications Return type: unicode
-
default_fcm_notification_protocol_version
¶ Returns: The protocol version to use for sending FCM notifications Return type: unicode
-
default_gcm_notification_protocol_version
¶ Returns: The protocol version to use for sending GCM notifications Return type: unicode
-
delete
()[source]¶ Deletes the ServiceInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
delivery_callback_url
¶ Returns: Webhook URL Return type: unicode
-
facebook_messenger_page_id
¶ Returns: Deprecated Return type: unicode
-
fcm_credential_sid
¶ Returns: The SID of the Credential to use for FCM Bindings Return type: unicode
-
fetch
()[source]¶ Fetch the ServiceInstance
Returns: The fetched ServiceInstance Return type: twilio.rest.notify.v1.service.ServiceInstance
-
friendly_name
¶ Returns: The string that you assigned to describe the resource Return type: unicode
-
gcm_credential_sid
¶ Returns: The SID of the Credential to use for GCM Bindings Return type: unicode
-
links
¶ Returns: The URLs of the resources related to the service Return type: unicode
-
messaging_service_sid
¶ Returns: The SID of the Messaging Service to use for SMS Bindings Return type: unicode
-
notifications
¶ Access the notifications
Returns: twilio.rest.notify.v1.service.notification.NotificationList Return type: twilio.rest.notify.v1.service.notification.NotificationList
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
update
(friendly_name=<object object>, apn_credential_sid=<object object>, gcm_credential_sid=<object object>, messaging_service_sid=<object object>, facebook_messenger_page_id=<object object>, default_apn_notification_protocol_version=<object object>, default_gcm_notification_protocol_version=<object object>, fcm_credential_sid=<object object>, default_fcm_notification_protocol_version=<object object>, log_enabled=<object object>, alexa_skill_id=<object object>, default_alexa_notification_protocol_version=<object object>, delivery_callback_url=<object object>, delivery_callback_enabled=<object object>)[source]¶ Update the ServiceInstance
Parameters: - friendly_name (unicode) – A string to describe the resource
- apn_credential_sid (unicode) – The SID of the Credential to use for APN Bindings
- gcm_credential_sid (unicode) – The SID of the Credential to use for GCM Bindings
- messaging_service_sid (unicode) – The SID of the Messaging Service to use for SMS Bindings
- facebook_messenger_page_id (unicode) – Deprecated
- default_apn_notification_protocol_version (unicode) – The protocol version to use for sending APNS notifications
- default_gcm_notification_protocol_version (unicode) – The protocol version to use for sending GCM notifications
- fcm_credential_sid (unicode) – The SID of the Credential to use for FCM Bindings
- default_fcm_notification_protocol_version (unicode) – The protocol version to use for sending FCM notifications
- log_enabled (bool) – Whether to log notifications
- alexa_skill_id (unicode) – Deprecated
- default_alexa_notification_protocol_version (unicode) – Deprecated
- delivery_callback_url (unicode) – Webhook URL
- delivery_callback_enabled (bool) – Enable delivery callbacks
Returns: The updated ServiceInstance
Return type:
-
url
¶ Returns: The absolute URL of the Service resource Return type: unicode
-
-
class
twilio.rest.notify.v1.service.
ServiceList
(version)[source]¶ Bases:
twilio.base.list_resource.ListResource
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
create
(friendly_name=<object object>, apn_credential_sid=<object object>, gcm_credential_sid=<object object>, messaging_service_sid=<object object>, facebook_messenger_page_id=<object object>, default_apn_notification_protocol_version=<object object>, default_gcm_notification_protocol_version=<object object>, fcm_credential_sid=<object object>, default_fcm_notification_protocol_version=<object object>, log_enabled=<object object>, alexa_skill_id=<object object>, default_alexa_notification_protocol_version=<object object>, delivery_callback_url=<object object>, delivery_callback_enabled=<object object>)[source]¶ Create the ServiceInstance
Parameters: - friendly_name (unicode) – A string to describe the resource
- apn_credential_sid (unicode) – The SID of the Credential to use for APN Bindings
- gcm_credential_sid (unicode) – The SID of the Credential to use for GCM Bindings
- messaging_service_sid (unicode) – The SID of the Messaging Service to use for SMS Bindings
- facebook_messenger_page_id (unicode) – Deprecated
- default_apn_notification_protocol_version (unicode) – The protocol version to use for sending APNS notifications
- default_gcm_notification_protocol_version (unicode) – The protocol version to use for sending GCM notifications
- fcm_credential_sid (unicode) – The SID of the Credential to use for FCM Bindings
- default_fcm_notification_protocol_version (unicode) – The protocol version to use for sending FCM notifications
- log_enabled (bool) – Whether to log notifications
- alexa_skill_id (unicode) – Deprecated
- default_alexa_notification_protocol_version (unicode) – Deprecated
- delivery_callback_url (unicode) – Webhook URL
- delivery_callback_enabled (bool) – Enable delivery callbacks
Returns: The created ServiceInstance
Return type:
-
get
(sid)[source]¶ Constructs a ServiceContext
Parameters: sid – The unique string that identifies the resource Returns: twilio.rest.notify.v1.service.ServiceContext Return type: twilio.rest.notify.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.notify.v1.service.ServicePage
-
list
(friendly_name=<object object>, 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: - friendly_name (unicode) – The string that identifies the Service 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
(friendly_name=<object object>, 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
(friendly_name=<object object>, 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: - friendly_name (unicode) – The string that identifies the Service 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.notify.v1.service.
ServicePage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
PLEASE 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.notify.v1.service.ServiceInstance Return type: twilio.rest.notify.v1.service.ServiceInstance
-