twilio.rest.studio.v1.flow.execution package

Submodules

twilio.rest.studio.v1.flow.execution.execution_context module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextContext(version, flow_sid, execution_sid)[source]

Bases: twilio.base.instance_context.InstanceContext

fetch()[source]

Fetch the ExecutionContextInstance

Returns:The fetched ExecutionContextInstance
Return type:twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextInstance
class twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextInstance(version, payload, flow_sid, execution_sid)[source]

Bases: twilio.base.instance_resource.InstanceResource

account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
context
Returns:The current state of the flow
Return type:dict
execution_sid
Returns:The SID of the Execution
Return type:unicode
fetch()[source]

Fetch the ExecutionContextInstance

Returns:The fetched ExecutionContextInstance
Return type:twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextInstance
flow_sid
Returns:The SID of the Flow
Return type:unicode
url
Returns:The absolute URL of the resource
Return type:unicode
class twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextList(version, flow_sid, execution_sid)[source]

Bases: twilio.base.list_resource.ListResource

get()[source]

Constructs a ExecutionContextContext

Returns:twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextContext
Return type:twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextContext
class twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of ExecutionContextInstance

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

Module contents

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

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

Bases: twilio.base.instance_context.InstanceContext

delete()[source]

Deletes the ExecutionInstance

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

Access the execution_context

Returns:twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextList
Return type:twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextList
fetch()[source]

Fetch the ExecutionInstance

Returns:The fetched ExecutionInstance
Return type:twilio.rest.studio.v1.flow.execution.ExecutionInstance
steps

Access the steps

Returns:twilio.rest.studio.v1.flow.execution.execution_step.ExecutionStepList
Return type:twilio.rest.studio.v1.flow.execution.execution_step.ExecutionStepList
update(status)[source]

Update the ExecutionInstance

Parameters:status (ExecutionInstance.Status) – The status of the Execution
Returns:The updated ExecutionInstance
Return type:twilio.rest.studio.v1.flow.execution.ExecutionInstance
class twilio.rest.studio.v1.flow.execution.ExecutionInstance(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 the Execution
Return type:unicode
contact_sid
Returns:The SID of the Contact
Return type:unicode
context
Returns:The current state of the flow
Return type:dict
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 ExecutionInstance

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

Access the execution_context

Returns:twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextList
Return type:twilio.rest.studio.v1.flow.execution.execution_context.ExecutionContextList
fetch()[source]

Fetch the ExecutionInstance

Returns:The fetched ExecutionInstance
Return type:twilio.rest.studio.v1.flow.execution.ExecutionInstance
flow_sid
Returns:The SID of the Flow
Return type:unicode
Returns:Nested resource URLs
Return type:unicode
sid
Returns:The unique string that identifies the resource
Return type:unicode
status
Returns:The status of the Execution
Return type:ExecutionInstance.Status
steps

Access the steps

Returns:twilio.rest.studio.v1.flow.execution.execution_step.ExecutionStepList
Return type:twilio.rest.studio.v1.flow.execution.execution_step.ExecutionStepList
update(status)[source]

Update the ExecutionInstance

Parameters:status (ExecutionInstance.Status) – The status of the Execution
Returns:The updated ExecutionInstance
Return type:twilio.rest.studio.v1.flow.execution.ExecutionInstance
url
Returns:The absolute URL of the resource
Return type:unicode
class twilio.rest.studio.v1.flow.execution.ExecutionList(version, flow_sid)[source]

Bases: twilio.base.list_resource.ListResource

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

Create the ExecutionInstance

Parameters:
  • to (unicode) – The Contact phone number to start a Studio Flow Execution
  • from (unicode) – The Twilio phone number or Messaging Service SID to send messages or initiate calls from during the Flow Execution
  • parameters (dict) – JSON data that will be added to the Flow’s context
Returns:

The created ExecutionInstance

Return type:

twilio.rest.studio.v1.flow.execution.ExecutionInstance

get(sid)[source]

Constructs a ExecutionContext

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

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of ExecutionInstance
Return type:twilio.rest.studio.v1.flow.execution.ExecutionPage
list(date_created_from=<object object>, date_created_to=<object object>, limit=None, page_size=None)[source]

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

Parameters:
  • date_created_from (datetime) – Only show Executions that started on or after this ISO 8601 date-time
  • date_created_to (datetime) – Only show Executions that started before this ISO 8601 date-time
  • 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.execution.ExecutionInstance]

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

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

Parameters:
  • date_created_from (datetime) – Only show Executions that started on or after this ISO 8601 date-time
  • date_created_to (datetime) – Only show Executions that started before this ISO 8601 date-time
  • 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 ExecutionInstance

Return type:

twilio.rest.studio.v1.flow.execution.ExecutionPage

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

Streams ExecutionInstance 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:
  • date_created_from (datetime) – Only show Executions that started on or after this ISO 8601 date-time
  • date_created_to (datetime) – Only show Executions that started before this ISO 8601 date-time
  • 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.execution.ExecutionInstance]

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

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of ExecutionInstance

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