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.SubscribedEventInstance(version, payload, subscription_sid)[source]¶ Bases:
twilio.base.instance_resource.InstanceResourcePLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
account_sid¶ Returns: Account SID. Return type: unicode
-
subscription_sid¶ Returns: Subscription SID. Return type: unicode
-
type¶ Returns: Type of event being subscribed to. Return type: unicode
-
url¶ Returns: The URL of this resource. Return type: unicode
-
version¶ Returns: The schema version that the subscription should use. Return type: unicode
-
-
class
twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventList(version, subscription_sid)[source]¶ Bases:
twilio.base.list_resource.ListResourcePLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
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: 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.PagePLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
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.InstanceContextPLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
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
-
-
class
twilio.rest.events.v1.subscription.SubscriptionInstance(version, payload, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResourcePLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
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
-
links¶ 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:
-
url¶ Returns: The URL of this resource. Return type: unicode
-
-
class
twilio.rest.events.v1.subscription.SubscriptionList(version)[source]¶ Bases:
twilio.base.list_resource.ListResourcePLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
create(description, sink_sid, types)[source]¶ Create the SubscriptionInstance
Parameters: Returns: The created SubscriptionInstance
Return type:
-
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: Returns: Page of SubscriptionInstance
Return type:
-
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.PagePLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
-
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
-