twilio.rest.proxy.v1.service.session package¶
Subpackages¶
Submodules¶
twilio.rest.proxy.v1.service.session.interaction module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.proxy.v1.service.session.interaction.
InteractionContext
(version, service_sid, session_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 InteractionInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the InteractionInstance
Returns: The fetched InteractionInstance Return type: twilio.rest.proxy.v1.service.session.interaction.InteractionInstance
-
-
class
twilio.rest.proxy.v1.service.session.interaction.
InteractionInstance
(version, payload, service_sid, session_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
ResourceStatus
[source]¶ Bases:
object
-
ACCEPTED
= 'accepted'¶
-
ANSWERED
= 'answered'¶
-
BUSY
= 'busy'¶
-
CANCELED
= 'canceled'¶
-
COMPLETED
= 'completed'¶
-
DELETED
= 'deleted'¶
-
DELIVERED
= 'delivered'¶
-
DELIVERY_UNKNOWN
= 'delivery-unknown'¶
-
FAILED
= 'failed'¶
-
INITIATED
= 'initiated'¶
-
IN_PROGRESS
= 'in-progress'¶
-
NO_ANSWER
= 'no-answer'¶
-
QUEUED
= 'queued'¶
-
RECEIVED
= 'received'¶
-
RECEIVING
= 'receiving'¶
-
RINGING
= 'ringing'¶
-
SCHEDULED
= 'scheduled'¶
-
SENDING
= 'sending'¶
-
SENT
= 'sent'¶
-
UNDELIVERED
= 'undelivered'¶
-
UNKNOWN
= 'unknown'¶
-
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
data
¶ Returns: A JSON string that includes the message body of message interactions Return type: unicode
-
date_created
¶ Returns: The ISO 8601 date and time in GMT when the Interaction 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 InteractionInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the InteractionInstance
Returns: The fetched InteractionInstance Return type: twilio.rest.proxy.v1.service.session.interaction.InteractionInstance
-
inbound_participant_sid
¶ Returns: The SID of the inbound Participant resource Return type: unicode
-
inbound_resource_sid
¶ Returns: The SID of the inbound resource Return type: unicode
-
inbound_resource_status
¶ Returns: The inbound resource status of the Interaction Return type: InteractionInstance.ResourceStatus
-
inbound_resource_type
¶ Returns: The inbound resource type Return type: unicode
-
inbound_resource_url
¶ Returns: The URL of the Twilio inbound resource Return type: unicode
-
outbound_participant_sid
¶ Returns: The SID of the outbound Participant Return type: unicode
-
outbound_resource_sid
¶ Returns: The SID of the outbound resource Return type: unicode
-
outbound_resource_status
¶ Returns: The outbound resource status of the Interaction Return type: InteractionInstance.ResourceStatus
-
outbound_resource_type
¶ Returns: The outbound resource type Return type: unicode
-
outbound_resource_url
¶ Returns: The URL of the Twilio outbound resource Return type: unicode
-
service_sid
¶ Returns: The SID of the resource’s parent Service Return type: unicode
-
session_sid
¶ Returns: The SID of the resource’s parent Session Return type: unicode
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
type
¶ Returns: The Type of the Interaction Return type: InteractionInstance.Type
-
url
¶ Returns: The absolute URL of the Interaction resource Return type: unicode
-
class
-
class
twilio.rest.proxy.v1.service.session.interaction.
InteractionList
(version, service_sid, session_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.
-
get
(sid)[source]¶ Constructs a InteractionContext
Parameters: sid – The unique string that identifies the resource Returns: twilio.rest.proxy.v1.service.session.interaction.InteractionContext Return type: twilio.rest.proxy.v1.service.session.interaction.InteractionContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of InteractionInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of InteractionInstance Return type: twilio.rest.proxy.v1.service.session.interaction.InteractionPage
-
list
(limit=None, page_size=None)[source]¶ Lists InteractionInstance 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.proxy.v1.service.session.interaction.InteractionInstance]
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of InteractionInstance records from the API. Request is executed immediately
Parameters: Returns: Page of InteractionInstance
Return type: twilio.rest.proxy.v1.service.session.interaction.InteractionPage
-
stream
(limit=None, page_size=None)[source]¶ Streams InteractionInstance 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.proxy.v1.service.session.interaction.InteractionInstance]
-
-
class
twilio.rest.proxy.v1.service.session.interaction.
InteractionPage
(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 InteractionInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.proxy.v1.service.session.interaction.InteractionInstance Return type: twilio.rest.proxy.v1.service.session.interaction.InteractionInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.proxy.v1.service.session.
SessionContext
(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 SessionInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the SessionInstance
Returns: The fetched SessionInstance Return type: twilio.rest.proxy.v1.service.session.SessionInstance
-
interactions
¶ Access the interactions
Returns: twilio.rest.proxy.v1.service.session.interaction.InteractionList Return type: twilio.rest.proxy.v1.service.session.interaction.InteractionList
-
participants
¶ Access the participants
Returns: twilio.rest.proxy.v1.service.session.participant.ParticipantList Return type: twilio.rest.proxy.v1.service.session.participant.ParticipantList
-
update
(date_expiry=<object object>, ttl=<object object>, status=<object object>, fail_on_participant_conflict=<object object>)[source]¶ Update the SessionInstance
Parameters: - date_expiry (datetime) – The ISO 8601 date when the Session should expire
- ttl (unicode) – When the session will expire
- status (SessionInstance.Status) – The new status of the resource
- fail_on_participant_conflict (bool) – An experimental parameter to override the ProxyAllowParticipantConflict account flag on a per-request basis.
Returns: The updated SessionInstance
Return type:
-
-
class
twilio.rest.proxy.v1.service.session.
SessionInstance
(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
Mode
[source]¶ Bases:
object
-
MESSAGE_ONLY
= 'message-only'¶
-
VOICE_AND_MESSAGE
= 'voice-and-message'¶
-
VOICE_ONLY
= 'voice-only'¶
-
-
class
Status
[source]¶ Bases:
object
-
CLOSED
= 'closed'¶
-
FAILED
= 'failed'¶
-
IN_PROGRESS
= 'in-progress'¶
-
OPEN
= 'open'¶
-
UNKNOWN
= 'unknown'¶
-
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
closed_reason
¶ Returns: The reason the Session ended Return type: unicode
-
date_created
¶ Returns: The ISO 8601 date and time in GMT when the resource was created Return type: datetime
-
date_ended
¶ Returns: The ISO 8601 date when the Session ended Return type: datetime
-
date_expiry
¶ Returns: The ISO 8601 date when the Session should expire Return type: datetime
-
date_last_interaction
¶ Returns: The ISO 8601 date when the Session last had an interaction Return type: datetime
-
date_started
¶ Returns: The ISO 8601 date when the Session started 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 SessionInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the SessionInstance
Returns: The fetched SessionInstance Return type: twilio.rest.proxy.v1.service.session.SessionInstance
-
interactions
¶ Access the interactions
Returns: twilio.rest.proxy.v1.service.session.interaction.InteractionList Return type: twilio.rest.proxy.v1.service.session.interaction.InteractionList
-
links
¶ Returns: The URLs of resources related to the Session Return type: unicode
-
mode
¶ Returns: The Mode of the Session Return type: SessionInstance.Mode
-
participants
¶ Access the participants
Returns: twilio.rest.proxy.v1.service.session.participant.ParticipantList Return type: twilio.rest.proxy.v1.service.session.participant.ParticipantList
-
service_sid
¶ Returns: The SID of the resource’s parent Service Return type: unicode
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
status
¶ Returns: The status of the Session Return type: SessionInstance.Status
-
ttl
¶ Returns: When the session will expire Return type: unicode
-
unique_name
¶ Returns: An application-defined string that uniquely identifies the resource Return type: unicode
-
update
(date_expiry=<object object>, ttl=<object object>, status=<object object>, fail_on_participant_conflict=<object object>)[source]¶ Update the SessionInstance
Parameters: - date_expiry (datetime) – The ISO 8601 date when the Session should expire
- ttl (unicode) – When the session will expire
- status (SessionInstance.Status) – The new status of the resource
- fail_on_participant_conflict (bool) – An experimental parameter to override the ProxyAllowParticipantConflict account flag on a per-request basis.
Returns: The updated SessionInstance
Return type:
-
url
¶ Returns: The absolute URL of the Session resource Return type: unicode
-
class
-
class
twilio.rest.proxy.v1.service.session.
SessionList
(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
(unique_name=<object object>, date_expiry=<object object>, ttl=<object object>, mode=<object object>, status=<object object>, participants=<object object>, fail_on_participant_conflict=<object object>)[source]¶ Create the SessionInstance
Parameters: - unique_name (unicode) – An application-defined string that uniquely identifies the resource
- date_expiry (datetime) – The ISO 8601 date when the Session should expire
- ttl (unicode) – When the session will expire
- mode (SessionInstance.Mode) – The Mode of the Session
- status (SessionInstance.Status) – Session status
- participants (list[dict]) – The Participant objects to include in the new session
- fail_on_participant_conflict (bool) – An experimental parameter to override the ProxyAllowParticipantConflict account flag on a per-request basis.
Returns: The created SessionInstance
Return type:
-
get
(sid)[source]¶ Constructs a SessionContext
Parameters: sid – The unique string that identifies the resource Returns: twilio.rest.proxy.v1.service.session.SessionContext Return type: twilio.rest.proxy.v1.service.session.SessionContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of SessionInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of SessionInstance Return type: twilio.rest.proxy.v1.service.session.SessionPage
-
list
(limit=None, page_size=None)[source]¶ Lists SessionInstance 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 SessionInstance records from the API. Request is executed immediately
Parameters: Returns: Page of SessionInstance
Return type:
-
stream
(limit=None, page_size=None)[source]¶ Streams SessionInstance 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.proxy.v1.service.session.
SessionPage
(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 SessionInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.proxy.v1.service.session.SessionInstance Return type: twilio.rest.proxy.v1.service.session.SessionInstance
-