twilio.rest.conversations.v1.conversation.message package

Submodules

twilio.rest.conversations.v1.conversation.message.delivery_receipt module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/conversations/v1/conversation/message/delivery_receipt.py:docstring of twilio.rest.conversations.v1.conversation.message.delivery_receipt, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.conversations.v1.conversation.message.delivery_receipt.DeliveryReceiptContext(version, conversation_sid, message_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

fetch()[source]

Fetch the DeliveryReceiptInstance

Returns:The fetched DeliveryReceiptInstance
Return type:twilio.rest.conversations.v1.conversation.message.delivery_receipt.DeliveryReceiptInstance
class twilio.rest.conversations.v1.conversation.message.delivery_receipt.DeliveryReceiptInstance(version, payload, conversation_sid, message_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

class DeliveryStatus[source]

Bases: object

DELIVERED = 'delivered'
FAILED = 'failed'
READ = 'read'
SENT = 'sent'
UNDELIVERED = 'undelivered'
account_sid
Returns:The unique ID of the Account responsible for this participant.
Return type:unicode
channel_message_sid
Returns:A messaging channel-specific identifier for the message delivered to participant
Return type:unicode
conversation_sid
Returns:The unique ID of the Conversation for this message.
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
error_code
Returns:The message delivery error code for a failed status
Return type:unicode
fetch()[source]

Fetch the DeliveryReceiptInstance

Returns:The fetched DeliveryReceiptInstance
Return type:twilio.rest.conversations.v1.conversation.message.delivery_receipt.DeliveryReceiptInstance
message_sid
Returns:The SID of the message the delivery receipt belongs to
Return type:unicode
participant_sid
Returns:The unique ID of the participant the delivery receipt belongs to.
Return type:unicode
sid
Returns:A 34 character string that uniquely identifies this resource.
Return type:unicode
status
Returns:The message delivery status
Return type:DeliveryReceiptInstance.DeliveryStatus
url
Returns:An absolute URL for this delivery receipt.
Return type:unicode
class twilio.rest.conversations.v1.conversation.message.delivery_receipt.DeliveryReceiptList(version, conversation_sid, message_sid)[source]

Bases: twilio.base.list_resource.ListResource

get(sid)[source]

Constructs a DeliveryReceiptContext

Parameters:sid – A 34 character string that uniquely identifies this resource.
Returns:twilio.rest.conversations.v1.conversation.message.delivery_receipt.DeliveryReceiptContext
Return type:twilio.rest.conversations.v1.conversation.message.delivery_receipt.DeliveryReceiptContext
get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of DeliveryReceiptInstance
Return type:twilio.rest.conversations.v1.conversation.message.delivery_receipt.DeliveryReceiptPage
list(limit=None, page_size=None)[source]

Lists DeliveryReceiptInstance 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.conversation.message.delivery_receipt.DeliveryReceiptInstance]

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

Retrieve a single page of DeliveryReceiptInstance 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 DeliveryReceiptInstance

Return type:

twilio.rest.conversations.v1.conversation.message.delivery_receipt.DeliveryReceiptPage

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

Streams DeliveryReceiptInstance 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.conversation.message.delivery_receipt.DeliveryReceiptInstance]

class twilio.rest.conversations.v1.conversation.message.delivery_receipt.DeliveryReceiptPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of DeliveryReceiptInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.conversations.v1.conversation.message.delivery_receipt.DeliveryReceiptInstance
Return type:twilio.rest.conversations.v1.conversation.message.delivery_receipt.DeliveryReceiptInstance

Module contents

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

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/conversations/v1/conversation/message/__init__.py:docstring of twilio.rest.conversations.v1.conversation.message, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.conversations.v1.conversation.message.MessageContext(version, conversation_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

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

Deletes the MessageInstance

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

Access the delivery_receipts

Returns:twilio.rest.conversations.v1.conversation.message.delivery_receipt.DeliveryReceiptList
Return type:twilio.rest.conversations.v1.conversation.message.delivery_receipt.DeliveryReceiptList
fetch()[source]

Fetch the MessageInstance

Returns:The fetched MessageInstance
Return type:twilio.rest.conversations.v1.conversation.message.MessageInstance
update(author=<object object>, body=<object object>, date_created=<object object>, date_updated=<object object>, attributes=<object object>, x_twilio_webhook_enabled=<object object>)[source]

Update the MessageInstance

Parameters:
  • author (unicode) – The channel specific identifier of the message’s author.
  • body (unicode) – The content of the message.
  • date_created (datetime) – The date that this resource was created.
  • date_updated (datetime) – The date that this resource was last updated.
  • attributes (unicode) – A string metadata field you can use to store any data you wish.
  • x_twilio_webhook_enabled (MessageInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:

The updated MessageInstance

Return type:

twilio.rest.conversations.v1.conversation.message.MessageInstance

class twilio.rest.conversations.v1.conversation.message.MessageInstance(version, payload, conversation_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

class OrderType[source]

Bases: object

ASC = 'asc'
DESC = 'desc'
class WebhookEnabledType[source]

Bases: object

FALSE = 'false'
TRUE = 'true'
account_sid
Returns:The unique ID of the Account responsible for this message.
Return type:unicode
attributes
Returns:A string metadata field you can use to store any data you wish.
Return type:unicode
author
Returns:The channel specific identifier of the message’s author.
Return type:unicode
body
Returns:The content of the message.
Return type:unicode
conversation_sid
Returns:The unique ID of the Conversation for this message.
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(x_twilio_webhook_enabled=<object object>)[source]

Deletes the MessageInstance

Parameters:x_twilio_webhook_enabled (MessageInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:True if delete succeeds, False otherwise
Return type:bool
delivery
Returns:An object that contains the summary of delivery statuses for the message to non-chat participants.
Return type:dict
delivery_receipts

Access the delivery_receipts

Returns:twilio.rest.conversations.v1.conversation.message.delivery_receipt.DeliveryReceiptList
Return type:twilio.rest.conversations.v1.conversation.message.delivery_receipt.DeliveryReceiptList
fetch()[source]

Fetch the MessageInstance

Returns:The fetched MessageInstance
Return type:twilio.rest.conversations.v1.conversation.message.MessageInstance
index
Returns:The index of the message within the Conversation.
Return type:unicode
Returns:Absolute URL to access the receipts of this message.
Return type:unicode
media
Returns:An array of objects that describe the Message’s media if attached, otherwise, null.
Return type:list[dict]
participant_sid
Returns:The unique ID of messages’s author participant.
Return type:unicode
sid
Returns:A 34 character string that uniquely identifies this resource.
Return type:unicode
update(author=<object object>, body=<object object>, date_created=<object object>, date_updated=<object object>, attributes=<object object>, x_twilio_webhook_enabled=<object object>)[source]

Update the MessageInstance

Parameters:
  • author (unicode) – The channel specific identifier of the message’s author.
  • body (unicode) – The content of the message.
  • date_created (datetime) – The date that this resource was created.
  • date_updated (datetime) – The date that this resource was last updated.
  • attributes (unicode) – A string metadata field you can use to store any data you wish.
  • x_twilio_webhook_enabled (MessageInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:

The updated MessageInstance

Return type:

twilio.rest.conversations.v1.conversation.message.MessageInstance

url
Returns:An absolute API URL for this message.
Return type:unicode
class twilio.rest.conversations.v1.conversation.message.MessageList(version, conversation_sid)[source]

Bases: twilio.base.list_resource.ListResource

create(author=<object object>, body=<object object>, date_created=<object object>, date_updated=<object object>, attributes=<object object>, media_sid=<object object>, x_twilio_webhook_enabled=<object object>)[source]

Create the MessageInstance

Parameters:
  • author (unicode) – The channel specific identifier of the message’s author.
  • body (unicode) – The content of the message.
  • date_created (datetime) – The date that this resource was created.
  • date_updated (datetime) – The date that this resource was last updated.
  • attributes (unicode) – A string metadata field you can use to store any data you wish.
  • media_sid (unicode) – The Media SID to be attached to the new Message.
  • x_twilio_webhook_enabled (MessageInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:

The created MessageInstance

Return type:

twilio.rest.conversations.v1.conversation.message.MessageInstance

get(sid)[source]

Constructs a MessageContext

Parameters:sid – A 34 character string that uniquely identifies this resource.
Returns:twilio.rest.conversations.v1.conversation.message.MessageContext
Return type:twilio.rest.conversations.v1.conversation.message.MessageContext
get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of MessageInstance
Return type:twilio.rest.conversations.v1.conversation.message.MessagePage
list(order=<object object>, limit=None, page_size=None)[source]

Lists MessageInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.

Parameters:
  • order (MessageInstance.OrderType) – The sort order of the returned messages
  • 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.conversation.message.MessageInstance]

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

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

Parameters:
  • order (MessageInstance.OrderType) – The sort order of the returned messages
  • 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 MessageInstance

Return type:

twilio.rest.conversations.v1.conversation.message.MessagePage

stream(order=<object object>, limit=None, page_size=None)[source]

Streams MessageInstance 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:
  • order (MessageInstance.OrderType) – The sort order of the returned messages
  • 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.conversation.message.MessageInstance]

class twilio.rest.conversations.v1.conversation.message.MessagePage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of MessageInstance

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