twilio.rest.wireless.v1 package¶
Subpackages¶
Submodules¶
twilio.rest.wireless.v1.command module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.wireless.v1.command.
CommandContext
(version, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
delete
()[source]¶ Deletes the CommandInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the CommandInstance
Returns: The fetched CommandInstance Return type: twilio.rest.wireless.v1.command.CommandInstance
-
-
class
twilio.rest.wireless.v1.command.
CommandInstance
(version, payload, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
class
Status
[source]¶ Bases:
object
-
DELIVERED
= 'delivered'¶
-
FAILED
= 'failed'¶
-
QUEUED
= 'queued'¶
-
RECEIVED
= 'received'¶
-
SENT
= 'sent'¶
-
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
command
¶ Returns: The message being sent to or from the SIM Return type: unicode
-
command_mode
¶ Returns: The mode used to send the SMS message Return type: CommandInstance.CommandMode
-
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 format Return type: datetime
-
delete
()[source]¶ Deletes the CommandInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
direction
¶ Returns: The direction of the Command Return type: CommandInstance.Direction
-
fetch
()[source]¶ Fetch the CommandInstance
Returns: The fetched CommandInstance Return type: twilio.rest.wireless.v1.command.CommandInstance
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
sim_sid
¶ Returns: The SID of the Sim resource that the Command was sent to or from Return type: unicode
-
status
¶ Returns: The status of the Command Return type: CommandInstance.Status
-
transport
¶ Returns: The type of transport used Return type: CommandInstance.Transport
-
url
¶ Returns: The absolute URL of the resource Return type: unicode
-
class
-
class
twilio.rest.wireless.v1.command.
CommandList
(version)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(command, sim=<object object>, callback_method=<object object>, callback_url=<object object>, command_mode=<object object>, include_sid=<object object>, delivery_receipt_requested=<object object>)[source]¶ Create the CommandInstance
Parameters: - command (unicode) – The message body of the Command or a Base64 encoded byte string in binary mode
- sim (unicode) – The sid or unique_name of the SIM to send the Command to
- callback_method (unicode) – The HTTP method we use to call callback_url
- callback_url (unicode) – he URL we call when the Command has finished sending
- command_mode (CommandInstance.CommandMode) – The mode to use when sending the SMS message
- include_sid (unicode) – Whether to include the SID of the command in the message body
- delivery_receipt_requested (bool) – Whether to request delivery receipt from the recipient
Returns: The created CommandInstance
Return type:
-
get
(sid)[source]¶ Constructs a CommandContext
Parameters: sid – The SID that identifies the resource to fetch Returns: twilio.rest.wireless.v1.command.CommandContext Return type: twilio.rest.wireless.v1.command.CommandContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of CommandInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of CommandInstance Return type: twilio.rest.wireless.v1.command.CommandPage
-
list
(sim=<object object>, status=<object object>, direction=<object object>, transport=<object object>, limit=None, page_size=None)[source]¶ Lists CommandInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - sim (unicode) – The sid or unique_name of the Sim resources to read
- status (CommandInstance.Status) – The status of the resources to read
- direction (CommandInstance.Direction) – Only return Commands with this direction value
- transport (CommandInstance.Transport) – Only return Commands with this transport value
- 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:
-
page
(sim=<object object>, status=<object object>, direction=<object object>, transport=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of CommandInstance records from the API. Request is executed immediately
Parameters: - sim (unicode) – The sid or unique_name of the Sim resources to read
- status (CommandInstance.Status) – The status of the resources to read
- direction (CommandInstance.Direction) – Only return Commands with this direction value
- transport (CommandInstance.Transport) – Only return Commands with this transport value
- 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 CommandInstance
Return type:
-
stream
(sim=<object object>, status=<object object>, direction=<object object>, transport=<object object>, limit=None, page_size=None)[source]¶ Streams CommandInstance 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: - sim (unicode) – The sid or unique_name of the Sim resources to read
- status (CommandInstance.Status) – The status of the resources to read
- direction (CommandInstance.Direction) – Only return Commands with this direction value
- transport (CommandInstance.Transport) – Only return Commands with this transport value
- 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:
-
-
class
twilio.rest.wireless.v1.command.
CommandPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of CommandInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.wireless.v1.command.CommandInstance Return type: twilio.rest.wireless.v1.command.CommandInstance
-
twilio.rest.wireless.v1.rate_plan module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.wireless.v1.rate_plan.
RatePlanContext
(version, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
delete
()[source]¶ Deletes the RatePlanInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the RatePlanInstance
Returns: The fetched RatePlanInstance Return type: twilio.rest.wireless.v1.rate_plan.RatePlanInstance
-
update
(unique_name=<object object>, friendly_name=<object object>)[source]¶ Update the RatePlanInstance
Parameters: - unique_name (unicode) – An application-defined string that uniquely identifies the resource
- friendly_name (unicode) – A string to describe the resource
Returns: The updated RatePlanInstance
Return type:
-
-
class
twilio.rest.wireless.v1.rate_plan.
RatePlanInstance
(version, payload, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
data_limit
¶ Returns: The total data usage in Megabytes that the Network allows during one month on the home network Return type: unicode
-
data_metering
¶ Returns: The model used to meter data usage Return type: unicode
-
date_created
¶ Returns: The date when the resource was created, given as GMT in ISO 8601 format Return type: datetime
-
date_updated
¶ Returns: The date when the resource was last updated, given as GMT in ISO 8601 format Return type: datetime
-
delete
()[source]¶ Deletes the RatePlanInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the RatePlanInstance
Returns: The fetched RatePlanInstance Return type: twilio.rest.wireless.v1.rate_plan.RatePlanInstance
-
friendly_name
¶ Returns: The string that you assigned to describe the resource Return type: unicode
-
international_roaming
¶ Returns: The services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States Return type: list[unicode]
-
international_roaming_data_limit
¶ Returns: The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States Return type: unicode
-
messaging_enabled
¶ Returns: Whether SIMs can make, send, and receive SMS using Commands Return type: bool
-
national_roaming_data_limit
¶ Returns: The total data usage in Megabytes that the Network allows during one month on non-home networks in the United States Return type: unicode
-
national_roaming_enabled
¶ Returns: Whether SIMs can roam on networks other than the home network in the United States Return type: bool
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
unique_name
¶ Returns: An application-defined string that uniquely identifies the resource Return type: unicode
-
update
(unique_name=<object object>, friendly_name=<object object>)[source]¶ Update the RatePlanInstance
Parameters: - unique_name (unicode) – An application-defined string that uniquely identifies the resource
- friendly_name (unicode) – A string to describe the resource
Returns: The updated RatePlanInstance
Return type:
-
url
¶ Returns: The absolute URL of the resource Return type: unicode
-
-
class
twilio.rest.wireless.v1.rate_plan.
RatePlanList
(version)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(unique_name=<object object>, friendly_name=<object object>, data_enabled=<object object>, data_limit=<object object>, data_metering=<object object>, messaging_enabled=<object object>, voice_enabled=<object object>, national_roaming_enabled=<object object>, international_roaming=<object object>, national_roaming_data_limit=<object object>, international_roaming_data_limit=<object object>)[source]¶ Create the RatePlanInstance
Parameters: - unique_name (unicode) – An application-defined string that uniquely identifies the resource
- friendly_name (unicode) – A string to describe the resource
- data_enabled (bool) – Whether SIMs can use GPRS/3G/4G/LTE data connectivity
- data_limit (unicode) – The total data usage in Megabytes that the Network allows during one month on the home network
- data_metering (unicode) – The model used to meter data usage
- messaging_enabled (bool) – Whether SIMs can make, send, and receive SMS using Commands
- voice_enabled (bool) – Deprecated
- national_roaming_enabled (bool) – Whether SIMs can roam on networks other than the home network in the United States
- international_roaming (list[unicode]) – The services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States
- national_roaming_data_limit (unicode) – The total data usage in Megabytes that the Network allows during one month on non-home networks in the United States
- international_roaming_data_limit (unicode) – The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States
Returns: The created RatePlanInstance
Return type:
-
get
(sid)[source]¶ Constructs a RatePlanContext
Parameters: sid – The SID that identifies the resource to fetch Returns: twilio.rest.wireless.v1.rate_plan.RatePlanContext Return type: twilio.rest.wireless.v1.rate_plan.RatePlanContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of RatePlanInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of RatePlanInstance Return type: twilio.rest.wireless.v1.rate_plan.RatePlanPage
-
list
(limit=None, page_size=None)[source]¶ Lists RatePlanInstance 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:
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of RatePlanInstance records from the API. Request is executed immediately
Parameters: Returns: Page of RatePlanInstance
Return type:
-
stream
(limit=None, page_size=None)[source]¶ Streams RatePlanInstance 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:
-
-
class
twilio.rest.wireless.v1.rate_plan.
RatePlanPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of RatePlanInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.wireless.v1.rate_plan.RatePlanInstance Return type: twilio.rest.wireless.v1.rate_plan.RatePlanInstance
-
twilio.rest.wireless.v1.usage_record module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.wireless.v1.usage_record.
UsageRecordInstance
(version, payload)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
commands
¶ Returns: An object that describes the aggregated Commands usage for all SIMs during the specified period Return type: dict
-
-
class
twilio.rest.wireless.v1.usage_record.
UsageRecordList
(version)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
get_page
(target_url)[source]¶ Retrieve a specific page of UsageRecordInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of UsageRecordInstance Return type: twilio.rest.wireless.v1.usage_record.UsageRecordPage
-
list
(end=<object object>, start=<object object>, granularity=<object object>, limit=None, page_size=None)[source]¶ Lists UsageRecordInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - end (datetime) – Only include usage that has occurred on or before this date
- start (datetime) – Only include usage that has occurred on or after this date
- granularity (UsageRecordInstance.Granularity) – The time-based grouping that results are aggregated by
- 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.wireless.v1.usage_record.UsageRecordInstance]
-
page
(end=<object object>, start=<object object>, granularity=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of UsageRecordInstance records from the API. Request is executed immediately
Parameters: - end (datetime) – Only include usage that has occurred on or before this date
- start (datetime) – Only include usage that has occurred on or after this date
- granularity (UsageRecordInstance.Granularity) – The time-based grouping that results are aggregated by
- 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 UsageRecordInstance
Return type:
-
stream
(end=<object object>, start=<object object>, granularity=<object object>, limit=None, page_size=None)[source]¶ Streams UsageRecordInstance 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: - end (datetime) – Only include usage that has occurred on or before this date
- start (datetime) – Only include usage that has occurred on or after this date
- granularity (UsageRecordInstance.Granularity) – The time-based grouping that results are aggregated by
- 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.wireless.v1.usage_record.UsageRecordInstance]
-
-
class
twilio.rest.wireless.v1.usage_record.
UsageRecordPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of UsageRecordInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.wireless.v1.usage_record.UsageRecordInstance Return type: twilio.rest.wireless.v1.usage_record.UsageRecordInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.wireless.v1.
V1
(domain)[source]¶ Bases:
twilio.base.version.Version
-
commands
¶ Return type: twilio.rest.wireless.v1.command.CommandList
-
rate_plans
¶ Return type: twilio.rest.wireless.v1.rate_plan.RatePlanList
-
sims
¶ Return type: twilio.rest.wireless.v1.sim.SimList
-
usage_records
¶ Return type: twilio.rest.wireless.v1.usage_record.UsageRecordList
-