twilio.rest.conversations.v1 package¶
Subpackages¶
- twilio.rest.conversations.v1.configuration package
- twilio.rest.conversations.v1.conversation package
- twilio.rest.conversations.v1.service package
- Subpackages
- Submodules
- twilio.rest.conversations.v1.service.binding module
- twilio.rest.conversations.v1.service.role module
- twilio.rest.conversations.v1.service.user module
- Module contents
Submodules¶
twilio.rest.conversations.v1.credential module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.conversations.v1.credential.CredentialContext(version, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext-
delete()[source]¶ Deletes the CredentialInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch()[source]¶ Fetch the CredentialInstance
Returns: The fetched CredentialInstance Return type: twilio.rest.conversations.v1.credential.CredentialInstance
-
update(type=<object object>, friendly_name=<object object>, certificate=<object object>, private_key=<object object>, sandbox=<object object>, api_key=<object object>, secret=<object object>)[source]¶ Update the CredentialInstance
Parameters: - type (CredentialInstance.PushType) – The type of push-notification service the credential is for.
- friendly_name (unicode) – A string to describe the resource
- certificate (unicode) – [APN only] The URL encoded representation of the certificate.
- private_key (unicode) – [APN only] The URL encoded representation of the private key.
- sandbox (bool) – [APN only] Whether to send the credential to sandbox APNs.
- api_key (unicode) – [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
- secret (unicode) – [FCM only] The Server key of your project from Firebase console.
Returns: The updated CredentialInstance
Return type:
-
-
class
twilio.rest.conversations.v1.credential.CredentialInstance(version, payload, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource-
account_sid¶ Returns: The unique ID of the Account responsible for this credential. 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 CredentialInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch()[source]¶ Fetch the CredentialInstance
Returns: The fetched CredentialInstance Return type: twilio.rest.conversations.v1.credential.CredentialInstance
-
friendly_name¶ Returns: The human-readable name of this credential. Return type: unicode
-
sandbox¶ Returns: [APN only] Whether to send the credential to sandbox APNs. Return type: unicode
-
sid¶ Returns: A 34 character string that uniquely identifies this resource. Return type: unicode
-
type¶ Returns: The type of push-notification service the credential is for. Return type: CredentialInstance.PushType
-
update(type=<object object>, friendly_name=<object object>, certificate=<object object>, private_key=<object object>, sandbox=<object object>, api_key=<object object>, secret=<object object>)[source]¶ Update the CredentialInstance
Parameters: - type (CredentialInstance.PushType) – The type of push-notification service the credential is for.
- friendly_name (unicode) – A string to describe the resource
- certificate (unicode) – [APN only] The URL encoded representation of the certificate.
- private_key (unicode) – [APN only] The URL encoded representation of the private key.
- sandbox (bool) – [APN only] Whether to send the credential to sandbox APNs.
- api_key (unicode) – [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
- secret (unicode) – [FCM only] The Server key of your project from Firebase console.
Returns: The updated CredentialInstance
Return type:
-
url¶ Returns: An absolute URL for this credential. Return type: unicode
-
-
class
twilio.rest.conversations.v1.credential.CredentialList(version)[source]¶ Bases:
twilio.base.list_resource.ListResource-
create(type, friendly_name=<object object>, certificate=<object object>, private_key=<object object>, sandbox=<object object>, api_key=<object object>, secret=<object object>)[source]¶ Create the CredentialInstance
Parameters: - type (CredentialInstance.PushType) – The type of push-notification service the credential is for.
- friendly_name (unicode) – A string to describe the resource
- certificate (unicode) – [APN only] The URL encoded representation of the certificate.
- private_key (unicode) – [APN only] The URL encoded representation of the private key.
- sandbox (bool) – [APN only] Whether to send the credential to sandbox APNs.
- api_key (unicode) – [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
- secret (unicode) – [FCM only] The Server key of your project from Firebase console.
Returns: The created CredentialInstance
Return type:
-
get(sid)[source]¶ Constructs a CredentialContext
Parameters: sid – A 34 character string that uniquely identifies this resource. Returns: twilio.rest.conversations.v1.credential.CredentialContext Return type: twilio.rest.conversations.v1.credential.CredentialContext
-
get_page(target_url)[source]¶ Retrieve a specific page of CredentialInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of CredentialInstance Return type: twilio.rest.conversations.v1.credential.CredentialPage
-
list(limit=None, page_size=None)[source]¶ Lists CredentialInstance 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.credential.CredentialInstance]
-
page(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of CredentialInstance records from the API. Request is executed immediately
Parameters: Returns: Page of CredentialInstance
Return type:
-
stream(limit=None, page_size=None)[source]¶ Streams CredentialInstance 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.credential.CredentialInstance]
-
-
class
twilio.rest.conversations.v1.credential.CredentialPage(version, response, solution)[source]¶ Bases:
twilio.base.page.Page-
get_instance(payload)[source]¶ Build an instance of CredentialInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.conversations.v1.credential.CredentialInstance Return type: twilio.rest.conversations.v1.credential.CredentialInstance
-
twilio.rest.conversations.v1.role module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.conversations.v1.role.RoleContext(version, 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.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.role.RoleInstance
-
-
class
twilio.rest.conversations.v1.role.RoleInstance(version, payload, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource-
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.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.role.RoleInstance
-
url¶ Returns: An absolute URL for this user role. Return type: unicode
-
-
class
twilio.rest.conversations.v1.role.RoleList(version)[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:
-
get(sid)[source]¶ Constructs a RoleContext
Parameters: sid – The SID of the Role resource to fetch Returns: twilio.rest.conversations.v1.role.RoleContext Return type: twilio.rest.conversations.v1.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.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:
-
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: Returns: Page of RoleInstance
Return type:
-
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:
-
-
class
twilio.rest.conversations.v1.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.role.RoleInstance Return type: twilio.rest.conversations.v1.role.RoleInstance
-
twilio.rest.conversations.v1.user module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.conversations.v1.user.UserContext(version, 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.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:
-
-
class
twilio.rest.conversations.v1.user.UserInstance(version, payload, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource-
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.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:
-
url¶ Returns: An absolute URL for this user. Return type: unicode
-
-
class
twilio.rest.conversations.v1.user.UserList(version)[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:
-
get(sid)[source]¶ Constructs a UserContext
Parameters: sid – The SID of the User resource to fetch Returns: twilio.rest.conversations.v1.user.UserContext Return type: twilio.rest.conversations.v1.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.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:
-
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: Returns: Page of UserInstance
Return type:
-
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:
-
-
class
twilio.rest.conversations.v1.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.user.UserInstance Return type: twilio.rest.conversations.v1.user.UserInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.conversations.v1.V1(domain)[source]¶ Bases:
twilio.base.version.Version-
configuration¶ Return type: twilio.rest.conversations.v1.configuration.ConfigurationList
-
conversations¶ Return type: twilio.rest.conversations.v1.conversation.ConversationList
-
credentials¶ Return type: twilio.rest.conversations.v1.credential.CredentialList
-
roles¶ Return type: twilio.rest.conversations.v1.role.RoleList
-
services¶ Return type: twilio.rest.conversations.v1.service.ServiceList
-
users¶ Return type: twilio.rest.conversations.v1.user.UserList
-