twilio.rest.verify.v2.service.rate_limit package

Submodules

twilio.rest.verify.v2.service.rate_limit.bucket module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.verify.v2.service.rate_limit.bucket.BucketContext(version, service_sid, rate_limit_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

delete()[source]

Deletes the BucketInstance

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

Fetch the BucketInstance

Returns:The fetched BucketInstance
Return type:twilio.rest.verify.v2.service.rate_limit.bucket.BucketInstance
update(max=<object object>, interval=<object object>)[source]

Update the BucketInstance

Parameters:
  • max (unicode) – Max number of requests.
  • interval (unicode) – Number of seconds that the rate limit will be enforced over.
Returns:

The updated BucketInstance

Return type:

twilio.rest.verify.v2.service.rate_limit.bucket.BucketInstance

class twilio.rest.verify.v2.service.rate_limit.bucket.BucketInstance(version, payload, service_sid, rate_limit_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
date_created
Returns:The RFC 2822 date and time in GMT when the resource was created
Return type:datetime
date_updated
Returns:The RFC 2822 date and time in GMT when the resource was last updated
Return type:datetime
delete()[source]

Deletes the BucketInstance

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

Fetch the BucketInstance

Returns:The fetched BucketInstance
Return type:twilio.rest.verify.v2.service.rate_limit.bucket.BucketInstance
interval
Returns:Number of seconds that the rate limit will be enforced over.
Return type:unicode
max
Returns:Max number of requests.
Return type:unicode
rate_limit_sid
Returns:Rate Limit Sid.
Return type:unicode
service_sid
Returns:The SID of the Service that the resource is associated with
Return type:unicode
sid
Returns:A string that uniquely identifies this Bucket.
Return type:unicode
update(max=<object object>, interval=<object object>)[source]

Update the BucketInstance

Parameters:
  • max (unicode) – Max number of requests.
  • interval (unicode) – Number of seconds that the rate limit will be enforced over.
Returns:

The updated BucketInstance

Return type:

twilio.rest.verify.v2.service.rate_limit.bucket.BucketInstance

url
Returns:The URL of this resource.
Return type:unicode
class twilio.rest.verify.v2.service.rate_limit.bucket.BucketList(version, service_sid, rate_limit_sid)[source]

Bases: twilio.base.list_resource.ListResource

create(max, interval)[source]

Create the BucketInstance

Parameters:
  • max (unicode) – Max number of requests.
  • interval (unicode) – Number of seconds that the rate limit will be enforced over.
Returns:

The created BucketInstance

Return type:

twilio.rest.verify.v2.service.rate_limit.bucket.BucketInstance

get(sid)[source]

Constructs a BucketContext

Parameters:sid – A string that uniquely identifies this Bucket.
Returns:twilio.rest.verify.v2.service.rate_limit.bucket.BucketContext
Return type:twilio.rest.verify.v2.service.rate_limit.bucket.BucketContext
get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of BucketInstance
Return type:twilio.rest.verify.v2.service.rate_limit.bucket.BucketPage
list(limit=None, page_size=None)[source]

Lists BucketInstance 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.verify.v2.service.rate_limit.bucket.BucketInstance]

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

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

Return type:

twilio.rest.verify.v2.service.rate_limit.bucket.BucketPage

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

Streams BucketInstance 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.verify.v2.service.rate_limit.bucket.BucketInstance]

class twilio.rest.verify.v2.service.rate_limit.bucket.BucketPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of BucketInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.verify.v2.service.rate_limit.bucket.BucketInstance
Return type:twilio.rest.verify.v2.service.rate_limit.bucket.BucketInstance

Module contents

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.verify.v2.service.rate_limit.RateLimitContext(version, service_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

buckets

Access the buckets

Returns:twilio.rest.verify.v2.service.rate_limit.bucket.BucketList
Return type:twilio.rest.verify.v2.service.rate_limit.bucket.BucketList
delete()[source]

Deletes the RateLimitInstance

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

Fetch the RateLimitInstance

Returns:The fetched RateLimitInstance
Return type:twilio.rest.verify.v2.service.rate_limit.RateLimitInstance
update(description=<object object>)[source]

Update the RateLimitInstance

Parameters:description (unicode) – Description of this Rate Limit
Returns:The updated RateLimitInstance
Return type:twilio.rest.verify.v2.service.rate_limit.RateLimitInstance
class twilio.rest.verify.v2.service.rate_limit.RateLimitInstance(version, payload, service_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
buckets

Access the buckets

Returns:twilio.rest.verify.v2.service.rate_limit.bucket.BucketList
Return type:twilio.rest.verify.v2.service.rate_limit.bucket.BucketList
date_created
Returns:The RFC 2822 date and time in GMT when the resource was created
Return type:datetime
date_updated
Returns:The RFC 2822 date and time in GMT when the resource was last updated
Return type:datetime
delete()[source]

Deletes the RateLimitInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
description
Returns:Description of this Rate Limit
Return type:unicode
fetch()[source]

Fetch the RateLimitInstance

Returns:The fetched RateLimitInstance
Return type:twilio.rest.verify.v2.service.rate_limit.RateLimitInstance
Returns:The URLs of related resources
Return type:unicode
service_sid
Returns:The SID of the Service that the resource is associated with
Return type:unicode
sid
Returns:A string that uniquely identifies this Rate Limit.
Return type:unicode
unique_name
Returns:A unique, developer assigned name of this Rate Limit.
Return type:unicode
update(description=<object object>)[source]

Update the RateLimitInstance

Parameters:description (unicode) – Description of this Rate Limit
Returns:The updated RateLimitInstance
Return type:twilio.rest.verify.v2.service.rate_limit.RateLimitInstance
url
Returns:The URL of this resource.
Return type:unicode
class twilio.rest.verify.v2.service.rate_limit.RateLimitList(version, service_sid)[source]

Bases: twilio.base.list_resource.ListResource

create(unique_name, description=<object object>)[source]

Create the RateLimitInstance

Parameters:
  • unique_name (unicode) – A unique, developer assigned name of this Rate Limit.
  • description (unicode) – Description of this Rate Limit
Returns:

The created RateLimitInstance

Return type:

twilio.rest.verify.v2.service.rate_limit.RateLimitInstance

get(sid)[source]

Constructs a RateLimitContext

Parameters:sid – The unique string that identifies the resource
Returns:twilio.rest.verify.v2.service.rate_limit.RateLimitContext
Return type:twilio.rest.verify.v2.service.rate_limit.RateLimitContext
get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of RateLimitInstance
Return type:twilio.rest.verify.v2.service.rate_limit.RateLimitPage
list(limit=None, page_size=None)[source]

Lists RateLimitInstance 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.verify.v2.service.rate_limit.RateLimitInstance]

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

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

Return type:

twilio.rest.verify.v2.service.rate_limit.RateLimitPage

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

Streams RateLimitInstance 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.verify.v2.service.rate_limit.RateLimitInstance]

class twilio.rest.verify.v2.service.rate_limit.RateLimitPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of RateLimitInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.verify.v2.service.rate_limit.RateLimitInstance
Return type:twilio.rest.verify.v2.service.rate_limit.RateLimitInstance