twilio.rest.conversations.v1.service package

Submodules

twilio.rest.conversations.v1.service.binding module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.conversations.v1.service.binding.BindingContext(version, chat_service_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

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.conversations.v1.service.binding.BindingInstance
class twilio.rest.conversations.v1.service.binding.BindingInstance(version, payload, chat_service_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

class BindingType[source]

Bases: object

APN = 'apn'
FCM = 'fcm'
GCM = 'gcm'
account_sid
Returns:The unique ID of the Account responsible for this binding.
Return type:unicode
binding_type
Returns:The push technology to use for the binding.
Return type:BindingInstance.BindingType
chat_service_sid
Returns:The SID of the Conversation Service that the resource is associated with.
Return type:unicode
credential_sid
Returns:The SID of the Credential for the binding.
Return type:unicode
date_created
Returns:The date that this resource was created.
Return type:datetime
date_updated
Returns:The date that this resource was last updated.
Return type:datetime
delete()[source]

Deletes the BindingInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
endpoint
Returns:The unique endpoint identifier for the Binding.
Return type:unicode
fetch()[source]

Fetch the BindingInstance

Returns:The fetched BindingInstance
Return type:twilio.rest.conversations.v1.service.binding.BindingInstance
identity
Returns:The identity of Conversation User associated with this binding.
Return type:unicode
message_types
Returns:The Conversation message types the binding is subscribed to.
Return type:list[unicode]
sid
Returns:A 34 character string that uniquely identifies this resource.
Return type:unicode
url
Returns:An absolute URL for this binding.
Return type:unicode
class twilio.rest.conversations.v1.service.binding.BindingList(version, chat_service_sid)[source]

Bases: twilio.base.list_resource.ListResource

get(sid)[source]

Constructs a BindingContext

Parameters:sid – A 34 character string that uniquely identifies this resource.
Returns:twilio.rest.conversations.v1.service.binding.BindingContext
Return type:twilio.rest.conversations.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.conversations.v1.service.binding.BindingPage
list(binding_type=<object object>, identity=<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:
  • binding_type (list[BindingInstance.BindingType]) – The push technology used by the Binding resources to read.
  • identity (list[unicode]) – The identity of Conversation User associated with this binding.
  • 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.conversations.v1.service.binding.BindingInstance]

page(binding_type=<object object>, identity=<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:
  • binding_type (list[BindingInstance.BindingType]) – The push technology used by the Binding resources to read.
  • identity (list[unicode]) – The identity of Conversation User associated with this binding.
  • 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:

twilio.rest.conversations.v1.service.binding.BindingPage

stream(binding_type=<object object>, identity=<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:
  • binding_type (list[BindingInstance.BindingType]) – The push technology used by the Binding resources to read.
  • identity (list[unicode]) – The identity of Conversation User associated with this binding.
  • 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.conversations.v1.service.binding.BindingInstance]

class twilio.rest.conversations.v1.service.binding.BindingPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of BindingInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.conversations.v1.service.binding.BindingInstance
Return type:twilio.rest.conversations.v1.service.binding.BindingInstance

twilio.rest.conversations.v1.service.role module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.conversations.v1.service.role.RoleContext(version, chat_service_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

delete()[source]

Deletes the RoleInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the RoleInstance

Returns:The fetched RoleInstance
Return type:twilio.rest.conversations.v1.service.role.RoleInstance
update(permission)[source]

Update the RoleInstance

Parameters:permission (list[unicode]) – A permission the role should have
Returns:The updated RoleInstance
Return type:twilio.rest.conversations.v1.service.role.RoleInstance
class twilio.rest.conversations.v1.service.role.RoleInstance(version, payload, chat_service_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

class RoleType[source]

Bases: object

CONVERSATION = 'conversation'
SERVICE = 'service'
account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
chat_service_sid
Returns:The SID of the Conversation Service that the resource is associated with
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 RoleInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the RoleInstance

Returns:The fetched RoleInstance
Return type:twilio.rest.conversations.v1.service.role.RoleInstance
friendly_name
Returns:The string that you assigned to describe the resource
Return type:unicode
permissions
Returns:An array of the permissions the role has been granted
Return type:list[unicode]
sid
Returns:The unique string that identifies the resource
Return type:unicode
type
Returns:The type of role
Return type:RoleInstance.RoleType
update(permission)[source]

Update the RoleInstance

Parameters:permission (list[unicode]) – A permission the role should have
Returns:The updated RoleInstance
Return type:twilio.rest.conversations.v1.service.role.RoleInstance
url
Returns:An absolute URL for this user role.
Return type:unicode
class twilio.rest.conversations.v1.service.role.RoleList(version, chat_service_sid)[source]

Bases: twilio.base.list_resource.ListResource

create(friendly_name, type, permission)[source]

Create the RoleInstance

Parameters:
  • friendly_name (unicode) – A string to describe the new resource
  • type (RoleInstance.RoleType) – The type of role
  • permission (list[unicode]) – A permission the role should have
Returns:

The created RoleInstance

Return type:

twilio.rest.conversations.v1.service.role.RoleInstance

get(sid)[source]

Constructs a RoleContext

Parameters:sid – The SID of the Role resource to fetch
Returns:twilio.rest.conversations.v1.service.role.RoleContext
Return type:twilio.rest.conversations.v1.service.role.RoleContext
get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of RoleInstance
Return type:twilio.rest.conversations.v1.service.role.RolePage
list(limit=None, page_size=None)[source]

Lists RoleInstance 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.conversations.v1.service.role.RoleInstance]

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

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

Parameters:
  • page_token (str) – PageToken provided by the API
  • page_number (int) – Page Number, this value is simply for client state
  • page_size (int) – Number of records to return, defaults to 50
Returns:

Page of RoleInstance

Return type:

twilio.rest.conversations.v1.service.role.RolePage

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

Streams RoleInstance 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.conversations.v1.service.role.RoleInstance]

class twilio.rest.conversations.v1.service.role.RolePage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of RoleInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.conversations.v1.service.role.RoleInstance
Return type:twilio.rest.conversations.v1.service.role.RoleInstance

twilio.rest.conversations.v1.service.user module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.conversations.v1.service.user.UserContext(version, chat_service_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

delete(x_twilio_webhook_enabled=<object object>)[source]

Deletes the UserInstance

Parameters:x_twilio_webhook_enabled (UserInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the UserInstance

Returns:The fetched UserInstance
Return type:twilio.rest.conversations.v1.service.user.UserInstance
update(friendly_name=<object object>, attributes=<object object>, role_sid=<object object>, x_twilio_webhook_enabled=<object object>)[source]

Update the UserInstance

Parameters:
  • friendly_name (unicode) – The string that you assigned to describe the resource
  • attributes (unicode) – The JSON Object string that stores application-specific data
  • role_sid (unicode) – The SID of a service-level Role to assign to the user
  • x_twilio_webhook_enabled (UserInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:

The updated UserInstance

Return type:

twilio.rest.conversations.v1.service.user.UserInstance

class twilio.rest.conversations.v1.service.user.UserInstance(version, payload, chat_service_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

class WebhookEnabledType[source]

Bases: object

FALSE = 'false'
TRUE = 'true'
account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
attributes
Returns:The JSON Object string that stores application-specific data
Return type:unicode
chat_service_sid
Returns:The SID of the Conversation Service that the resource is associated with
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(x_twilio_webhook_enabled=<object object>)[source]

Deletes the UserInstance

Parameters:x_twilio_webhook_enabled (UserInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the UserInstance

Returns:The fetched UserInstance
Return type:twilio.rest.conversations.v1.service.user.UserInstance
friendly_name
Returns:The string that you assigned to describe the resource
Return type:unicode
identity
Returns:The string that identifies the resource’s User
Return type:unicode
is_notifiable
Returns:Whether the User has a potentially valid Push Notification registration for this Conversations Service
Return type:bool
is_online
Returns:Whether the User is actively connected to this Conversations Service and online
Return type:bool
role_sid
Returns:The SID of a service-level Role assigned to the user
Return type:unicode
sid
Returns:The unique string that identifies the resource
Return type:unicode
update(friendly_name=<object object>, attributes=<object object>, role_sid=<object object>, x_twilio_webhook_enabled=<object object>)[source]

Update the UserInstance

Parameters:
  • friendly_name (unicode) – The string that you assigned to describe the resource
  • attributes (unicode) – The JSON Object string that stores application-specific data
  • role_sid (unicode) – The SID of a service-level Role to assign to the user
  • x_twilio_webhook_enabled (UserInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:

The updated UserInstance

Return type:

twilio.rest.conversations.v1.service.user.UserInstance

url
Returns:An absolute URL for this user.
Return type:unicode
class twilio.rest.conversations.v1.service.user.UserList(version, chat_service_sid)[source]

Bases: twilio.base.list_resource.ListResource

create(identity, friendly_name=<object object>, attributes=<object object>, role_sid=<object object>, x_twilio_webhook_enabled=<object object>)[source]

Create the UserInstance

Parameters:
  • identity (unicode) – The string that identifies the resource’s User
  • friendly_name (unicode) – The string that you assigned to describe the resource
  • attributes (unicode) – The JSON Object string that stores application-specific data
  • role_sid (unicode) – The SID of a service-level Role to assign to the user
  • x_twilio_webhook_enabled (UserInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:

The created UserInstance

Return type:

twilio.rest.conversations.v1.service.user.UserInstance

get(sid)[source]

Constructs a UserContext

Parameters:sid – The SID of the User resource to fetch
Returns:twilio.rest.conversations.v1.service.user.UserContext
Return type:twilio.rest.conversations.v1.service.user.UserContext
get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of UserInstance
Return type:twilio.rest.conversations.v1.service.user.UserPage
list(limit=None, page_size=None)[source]

Lists UserInstance 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.conversations.v1.service.user.UserInstance]

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

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

Parameters:
  • page_token (str) – PageToken provided by the API
  • page_number (int) – Page Number, this value is simply for client state
  • page_size (int) – Number of records to return, defaults to 50
Returns:

Page of UserInstance

Return type:

twilio.rest.conversations.v1.service.user.UserPage

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

Streams UserInstance 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.conversations.v1.service.user.UserInstance]

class twilio.rest.conversations.v1.service.user.UserPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of UserInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.conversations.v1.service.user.UserInstance
Return type:twilio.rest.conversations.v1.service.user.UserInstance

Module contents

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.conversations.v1.service.ServiceContext(version, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

bindings

Access the bindings

Returns:twilio.rest.conversations.v1.service.binding.BindingList
Return type:twilio.rest.conversations.v1.service.binding.BindingList
configuration

Access the configuration

Returns:twilio.rest.conversations.v1.service.configuration.ConfigurationList
Return type:twilio.rest.conversations.v1.service.configuration.ConfigurationList
conversations

Access the conversations

Returns:twilio.rest.conversations.v1.service.conversation.ConversationList
Return type:twilio.rest.conversations.v1.service.conversation.ConversationList
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.conversations.v1.service.ServiceInstance
roles

Access the roles

Returns:twilio.rest.conversations.v1.service.role.RoleList
Return type:twilio.rest.conversations.v1.service.role.RoleList
users

Access the users

Returns:twilio.rest.conversations.v1.service.user.UserList
Return type:twilio.rest.conversations.v1.service.user.UserList
class twilio.rest.conversations.v1.service.ServiceInstance(version, payload, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

account_sid
Returns:The unique ID of the Account responsible for this service.
Return type:unicode
bindings

Access the bindings

Returns:twilio.rest.conversations.v1.service.binding.BindingList
Return type:twilio.rest.conversations.v1.service.binding.BindingList
configuration

Access the configuration

Returns:twilio.rest.conversations.v1.service.configuration.ConfigurationList
Return type:twilio.rest.conversations.v1.service.configuration.ConfigurationList
conversations

Access the conversations

Returns:twilio.rest.conversations.v1.service.conversation.ConversationList
Return type:twilio.rest.conversations.v1.service.conversation.ConversationList
date_created
Returns:The date that this resource was created.
Return type:datetime
date_updated
Returns:The date that this resource was last updated.
Return type:datetime
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.conversations.v1.service.ServiceInstance
friendly_name
Returns:The human-readable name of this service.
Return type:unicode
Returns:Absolute URLs to access the conversations, users, roles, bindings and configuration of this service.
Return type:unicode
roles

Access the roles

Returns:twilio.rest.conversations.v1.service.role.RoleList
Return type:twilio.rest.conversations.v1.service.role.RoleList
sid
Returns:A 34 character string that uniquely identifies this resource.
Return type:unicode
url
Returns:An absolute URL for this service.
Return type:unicode
users

Access the users

Returns:twilio.rest.conversations.v1.service.user.UserList
Return type:twilio.rest.conversations.v1.service.user.UserList
class twilio.rest.conversations.v1.service.ServiceList(version)[source]

Bases: twilio.base.list_resource.ListResource

create(friendly_name)[source]

Create the ServiceInstance

Parameters:friendly_name (unicode) – The human-readable name of this service.
Returns:The created ServiceInstance
Return type:twilio.rest.conversations.v1.service.ServiceInstance
get(sid)[source]

Constructs a ServiceContext

Parameters:sid – A 34 character string that uniquely identifies this resource.
Returns:twilio.rest.conversations.v1.service.ServiceContext
Return type:twilio.rest.conversations.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.conversations.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:

list[twilio.rest.conversations.v1.service.ServiceInstance]

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:
  • 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 ServiceInstance

Return type:

twilio.rest.conversations.v1.service.ServicePage

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:

list[twilio.rest.conversations.v1.service.ServiceInstance]

class twilio.rest.conversations.v1.service.ServicePage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of ServiceInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.conversations.v1.service.ServiceInstance
Return type:twilio.rest.conversations.v1.service.ServiceInstance