twilio.rest.events.v1.subscription package

Submodules

twilio.rest.events.v1.subscription.subscribed_event module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventContext(version, subscription_sid, type)[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 SubscribedEventInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the SubscribedEventInstance

Returns:The fetched SubscribedEventInstance
Return type:twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventInstance
update(schema_version=<object object>)[source]

Update the SubscribedEventInstance

Parameters:schema_version (unicode) – The schema version that the subscription should use.
Returns:The updated SubscribedEventInstance
Return type:twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventInstance
class twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventInstance(version, payload, subscription_sid, type=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.

account_sid
Returns:Account SID.
Return type:unicode
delete()[source]

Deletes the SubscribedEventInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the SubscribedEventInstance

Returns:The fetched SubscribedEventInstance
Return type:twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventInstance
schema_version
Returns:The schema version that the subscription should use.
Return type:unicode
subscription_sid
Returns:Subscription SID.
Return type:unicode
type
Returns:Type of event being subscribed to.
Return type:unicode
update(schema_version=<object object>)[source]

Update the SubscribedEventInstance

Parameters:schema_version (unicode) – The schema version that the subscription should use.
Returns:The updated SubscribedEventInstance
Return type:twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventInstance
url
Returns:The URL of this resource.
Return type:unicode
class twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventList(version, subscription_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(type, schema_version=<object object>)[source]

Create the SubscribedEventInstance

Parameters:
  • type (unicode) – Type of event being subscribed to.
  • schema_version (unicode) – The schema version that the subscription should use.
Returns:

The created SubscribedEventInstance

Return type:

twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventInstance

get(type)[source]

Constructs a SubscribedEventContext

Parameters:type – Type of event being subscribed to.
Returns:twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventContext
Return type:twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventContext
get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of SubscribedEventInstance
Return type:twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventPage
list(limit=None, page_size=None)[source]

Lists SubscribedEventInstance 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.events.v1.subscription.subscribed_event.SubscribedEventInstance]

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

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

Return type:

twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventPage

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

Streams SubscribedEventInstance 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.events.v1.subscription.subscribed_event.SubscribedEventInstance]

class twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventPage(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 SubscribedEventInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventInstance
Return type:twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventInstance

Module contents

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.events.v1.subscription.SubscriptionContext(version, 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 SubscriptionInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the SubscriptionInstance

Returns:The fetched SubscriptionInstance
Return type:twilio.rest.events.v1.subscription.SubscriptionInstance
subscribed_events

Access the subscribed_events

Returns:twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventList
Return type:twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventList
update(description=<object object>, sink_sid=<object object>)[source]

Update the SubscriptionInstance

Parameters:
  • description (unicode) – Subscription description.
  • sink_sid (unicode) – Sink SID.
Returns:

The updated SubscriptionInstance

Return type:

twilio.rest.events.v1.subscription.SubscriptionInstance

class twilio.rest.events.v1.subscription.SubscriptionInstance(version, payload, 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.

account_sid
Returns:Account SID.
Return type:unicode
date_created
Returns:The date this Subscription was created
Return type:datetime
date_updated
Returns:The date this Subscription was updated
Return type:datetime
delete()[source]

Deletes the SubscriptionInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
description
Returns:Subscription description
Return type:unicode
fetch()[source]

Fetch the SubscriptionInstance

Returns:The fetched SubscriptionInstance
Return type:twilio.rest.events.v1.subscription.SubscriptionInstance
Returns:Nested resource URLs.
Return type:unicode
sid
Returns:A string that uniquely identifies this Subscription.
Return type:unicode
sink_sid
Returns:Sink SID.
Return type:unicode
subscribed_events

Access the subscribed_events

Returns:twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventList
Return type:twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventList
update(description=<object object>, sink_sid=<object object>)[source]

Update the SubscriptionInstance

Parameters:
  • description (unicode) – Subscription description.
  • sink_sid (unicode) – Sink SID.
Returns:

The updated SubscriptionInstance

Return type:

twilio.rest.events.v1.subscription.SubscriptionInstance

url
Returns:The URL of this resource.
Return type:unicode
class twilio.rest.events.v1.subscription.SubscriptionList(version)[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(description, sink_sid, types)[source]

Create the SubscriptionInstance

Parameters:
  • description (unicode) – Subscription description
  • sink_sid (unicode) – Sink SID.
  • types (list[dict]) – Subscribed Event Types
Returns:

The created SubscriptionInstance

Return type:

twilio.rest.events.v1.subscription.SubscriptionInstance

get(sid)[source]

Constructs a SubscriptionContext

Parameters:sid – A string that uniquely identifies this Subscription.
Returns:twilio.rest.events.v1.subscription.SubscriptionContext
Return type:twilio.rest.events.v1.subscription.SubscriptionContext
get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of SubscriptionInstance
Return type:twilio.rest.events.v1.subscription.SubscriptionPage
list(sink_sid=<object object>, limit=None, page_size=None)[source]

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

Parameters:
  • sink_sid (unicode) – Sink SID.
  • 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.events.v1.subscription.SubscriptionInstance]

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

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

Parameters:
  • sink_sid (unicode) – Sink SID.
  • 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 SubscriptionInstance

Return type:

twilio.rest.events.v1.subscription.SubscriptionPage

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

Streams SubscriptionInstance 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:
  • sink_sid (unicode) – Sink SID.
  • 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.events.v1.subscription.SubscriptionInstance]

class twilio.rest.events.v1.subscription.SubscriptionPage(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 SubscriptionInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.events.v1.subscription.SubscriptionInstance
Return type:twilio.rest.events.v1.subscription.SubscriptionInstance