twilio.rest.studio.v1.flow.engagement package

Submodules

twilio.rest.studio.v1.flow.engagement.engagement_context module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextContext(version, flow_sid, engagement_sid)[source]

Bases: twilio.base.instance_context.InstanceContext

fetch()[source]

Fetch the EngagementContextInstance

Returns:The fetched EngagementContextInstance
Return type:twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextInstance
class twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextInstance(version, payload, flow_sid, engagement_sid)[source]

Bases: twilio.base.instance_resource.InstanceResource

account_sid
Returns:Account SID
Return type:unicode
context
Returns:Flow state
Return type:dict
engagement_sid
Returns:Engagement SID
Return type:unicode
fetch()[source]

Fetch the EngagementContextInstance

Returns:The fetched EngagementContextInstance
Return type:twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextInstance
flow_sid
Returns:Flow SID
Return type:unicode
url
Returns:The URL of the resource
Return type:unicode
class twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextList(version, flow_sid, engagement_sid)[source]

Bases: twilio.base.list_resource.ListResource

get()[source]

Constructs a EngagementContextContext

Returns:twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextContext
Return type:twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextContext
class twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of EngagementContextInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextInstance
Return type:twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextInstance

Module contents

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.studio.v1.flow.engagement.EngagementContext(version, flow_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

delete()[source]

Deletes the EngagementInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
engagement_context

Access the engagement_context

Returns:twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextList
Return type:twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextList
fetch()[source]

Fetch the EngagementInstance

Returns:The fetched EngagementInstance
Return type:twilio.rest.studio.v1.flow.engagement.EngagementInstance
steps

Access the steps

Returns:twilio.rest.studio.v1.flow.engagement.step.StepList
Return type:twilio.rest.studio.v1.flow.engagement.step.StepList
class twilio.rest.studio.v1.flow.engagement.EngagementInstance(version, payload, flow_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

class Status[source]

Bases: object

ACTIVE = 'active'
ENDED = 'ended'
account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
contact_channel_address
Returns:The phone number, SIP address or Client identifier that triggered this Engagement
Return type:unicode
contact_sid
Returns:The SID of the Contact
Return type:unicode
context
Returns:The current state of the execution flow
Return type:dict
date_created
Returns:The ISO 8601 date and time in GMT when the Engagement was created
Return type:datetime
date_updated
Returns:The ISO 8601 date and time in GMT when the Engagement was last updated
Return type:datetime
delete()[source]

Deletes the EngagementInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
engagement_context

Access the engagement_context

Returns:twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextList
Return type:twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextList
fetch()[source]

Fetch the EngagementInstance

Returns:The fetched EngagementInstance
Return type:twilio.rest.studio.v1.flow.engagement.EngagementInstance
flow_sid
Returns:The SID of the Flow
Return type:unicode
Returns:The URLs of the Engagement’s nested resources
Return type:unicode
sid
Returns:The unique string that identifies the resource
Return type:unicode
status
Returns:The status of the Engagement
Return type:EngagementInstance.Status
steps

Access the steps

Returns:twilio.rest.studio.v1.flow.engagement.step.StepList
Return type:twilio.rest.studio.v1.flow.engagement.step.StepList
url
Returns:The absolute URL of the resource
Return type:unicode
class twilio.rest.studio.v1.flow.engagement.EngagementList(version, flow_sid)[source]

Bases: twilio.base.list_resource.ListResource

create(to, from_, parameters=<object object>)[source]

Create the EngagementInstance

Parameters:
  • to (unicode) – The Contact phone number to start a Studio Flow Engagement
  • from (unicode) – The Twilio phone number to send messages or initiate calls from during the Flow Engagement
  • parameters (dict) – A JSON string we will add to your flow’s context and that you can access as variables inside your flow
Returns:

The created EngagementInstance

Return type:

twilio.rest.studio.v1.flow.engagement.EngagementInstance

get(sid)[source]

Constructs a EngagementContext

Parameters:sid – The SID of the Engagement resource to fetch
Returns:twilio.rest.studio.v1.flow.engagement.EngagementContext
Return type:twilio.rest.studio.v1.flow.engagement.EngagementContext
get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of EngagementInstance
Return type:twilio.rest.studio.v1.flow.engagement.EngagementPage
list(limit=None, page_size=None)[source]

Lists EngagementInstance 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.studio.v1.flow.engagement.EngagementInstance]

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

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

Return type:

twilio.rest.studio.v1.flow.engagement.EngagementPage

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

Streams EngagementInstance 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.studio.v1.flow.engagement.EngagementInstance]

class twilio.rest.studio.v1.flow.engagement.EngagementPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of EngagementInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.studio.v1.flow.engagement.EngagementInstance
Return type:twilio.rest.studio.v1.flow.engagement.EngagementInstance