twilio.rest.wireless.v1.sim package

Submodules

twilio.rest.wireless.v1.sim.data_session module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.wireless.v1.sim.data_session.DataSessionInstance(version, payload, sim_sid)[source]

Bases: twilio.base.instance_resource.InstanceResource

account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
cell_id
Returns:The unique ID of the cellular tower that the device was attached to at the moment when the Data Session was last updated
Return type:unicode
cell_location_estimate
Returns:An object with the estimated location where the device’s Data Session took place
Return type:dict
end
Returns:The date that the record ended, given as GMT in ISO 8601 format
Return type:datetime
imei
Returns:The unique ID of the device using the SIM to connect
Return type:unicode
last_updated
Returns:The date that the resource was last updated, given as GMT in ISO 8601 format
Return type:datetime
operator_country
Returns:The three letter country code representing where the device’s Data Session took place
Return type:unicode
operator_mcc
Returns:The ‘mobile country code’ is the unique ID of the home country where the Data Session took place
Return type:unicode
operator_mnc
Returns:The ‘mobile network code’ is the unique ID specific to the mobile operator network where the Data Session took place
Return type:unicode
operator_name
Returns:The friendly name of the mobile operator network that the SIM-connected device is attached to
Return type:unicode
packets_downloaded
Returns:The number of packets downloaded by the device between the start time and when the Data Session was last updated
Return type:unicode
packets_uploaded
Returns:The number of packets uploaded by the device between the start time and when the Data Session was last updated
Return type:unicode
Returns:The generation of wireless technology that the device was using
Return type:unicode
sid
Returns:The unique string that identifies the resource
Return type:unicode
sim_sid
Returns:The SID of the Sim resource that the Data Session is for
Return type:unicode
start
Returns:The date that the Data Session started, given as GMT in ISO 8601 format
Return type:datetime
class twilio.rest.wireless.v1.sim.data_session.DataSessionList(version, sim_sid)[source]

Bases: twilio.base.list_resource.ListResource

get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of DataSessionInstance
Return type:twilio.rest.wireless.v1.sim.data_session.DataSessionPage
list(limit=None, page_size=None)[source]

Lists DataSessionInstance 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.wireless.v1.sim.data_session.DataSessionInstance]

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

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

Return type:

twilio.rest.wireless.v1.sim.data_session.DataSessionPage

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

Streams DataSessionInstance 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.wireless.v1.sim.data_session.DataSessionInstance]

class twilio.rest.wireless.v1.sim.data_session.DataSessionPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of DataSessionInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.wireless.v1.sim.data_session.DataSessionInstance
Return type:twilio.rest.wireless.v1.sim.data_session.DataSessionInstance

twilio.rest.wireless.v1.sim.usage_record module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.wireless.v1.sim.usage_record.UsageRecordInstance(version, payload, sim_sid)[source]

Bases: twilio.base.instance_resource.InstanceResource

class Granularity[source]

Bases: object

ALL = 'all'
DAILY = 'daily'
HOURLY = 'hourly'
account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
commands
Returns:An object that describes the SIM’s usage of Commands during the specified period
Return type:dict
data
Returns:An object that describes the SIM’s data usage during the specified period
Return type:dict
period
Returns:The time period for which the usage is reported
Return type:dict
sim_sid
Returns:The SID of the Sim resource that this Usage Record is for
Return type:unicode
class twilio.rest.wireless.v1.sim.usage_record.UsageRecordList(version, sim_sid)[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.sim.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 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.sim.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 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:

twilio.rest.wireless.v1.sim.usage_record.UsageRecordPage

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 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.sim.usage_record.UsageRecordInstance]

class twilio.rest.wireless.v1.sim.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.sim.usage_record.UsageRecordInstance
Return type:twilio.rest.wireless.v1.sim.usage_record.UsageRecordInstance

Module contents

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.wireless.v1.sim.SimContext(version, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

data_sessions

Access the data_sessions

Returns:twilio.rest.wireless.v1.sim.data_session.DataSessionList
Return type:twilio.rest.wireless.v1.sim.data_session.DataSessionList
delete()[source]

Deletes the SimInstance

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

Fetch the SimInstance

Returns:The fetched SimInstance
Return type:twilio.rest.wireless.v1.sim.SimInstance
update(unique_name=<object object>, callback_method=<object object>, callback_url=<object object>, friendly_name=<object object>, rate_plan=<object object>, status=<object object>, commands_callback_method=<object object>, commands_callback_url=<object object>, sms_fallback_method=<object object>, sms_fallback_url=<object object>, sms_method=<object object>, sms_url=<object object>, voice_fallback_method=<object object>, voice_fallback_url=<object object>, voice_method=<object object>, voice_url=<object object>, reset_status=<object object>, account_sid=<object object>)[source]

Update the SimInstance

Parameters:
  • unique_name (unicode) – An application-defined string that uniquely identifies the resource
  • callback_method (unicode) – The HTTP method we should use to call callback_url
  • callback_url (unicode) – The URL we should call when the Sim resource has finished updating
  • friendly_name (unicode) – A string to describe the Sim resource
  • rate_plan (unicode) – The SID or unique name of the RatePlan resource to which the Sim resource should be assigned
  • status (SimInstance.Status) – The new status of the Sim resource
  • commands_callback_method (unicode) – The HTTP method we should use to call commands_callback_url
  • commands_callback_url (unicode) – The URL we should call when the SIM sends a Command
  • sms_fallback_method (unicode) – The HTTP method we should use to call sms_fallback_url
  • sms_fallback_url (unicode) – The URL we should call when an error occurs while retrieving or executing the TwiML requested from sms_url
  • sms_method (unicode) – The HTTP method we should use to call sms_url
  • sms_url (unicode) – The URL we should call when the SIM-connected device sends an SMS message that is not a Command
  • voice_fallback_method (unicode) – Deprecated
  • voice_fallback_url (unicode) – Deprecated
  • voice_method (unicode) – Deprecated
  • voice_url (unicode) – Deprecated
  • reset_status (SimInstance.ResetStatus) – Initiate a connectivity reset on a SIM
  • account_sid (unicode) – The SID of the Account to which the Sim resource should belong
Returns:

The updated SimInstance

Return type:

twilio.rest.wireless.v1.sim.SimInstance

usage_records

Access the usage_records

Returns:twilio.rest.wireless.v1.sim.usage_record.UsageRecordList
Return type:twilio.rest.wireless.v1.sim.usage_record.UsageRecordList
class twilio.rest.wireless.v1.sim.SimInstance(version, payload, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

class ResetStatus[source]

Bases: object

RESETTING = 'resetting'
class Status[source]

Bases: object

ACTIVE = 'active'
CANCELED = 'canceled'
DEACTIVATED = 'deactivated'
NEW = 'new'
READY = 'ready'
SCHEDULED = 'scheduled'
SUSPENDED = 'suspended'
UPDATING = 'updating'
account_sid
Returns:The SID of the Account to which the Sim resource belongs
Return type:unicode
commands_callback_method
Returns:The HTTP method we use to call commands_callback_url
Return type:unicode
commands_callback_url
Returns:The URL we call when the SIM originates a machine-to-machine Command
Return type:unicode
data_sessions

Access the data_sessions

Returns:twilio.rest.wireless.v1.sim.data_session.DataSessionList
Return type:twilio.rest.wireless.v1.sim.data_session.DataSessionList
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 Sim resource was last updated
Return type:datetime
delete()[source]

Deletes the SimInstance

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

Fetch the SimInstance

Returns:The fetched SimInstance
Return type:twilio.rest.wireless.v1.sim.SimInstance
friendly_name
Returns:The string that you assigned to describe the Sim resource
Return type:unicode
iccid
Returns:The ICCID associated with the SIM
Return type:unicode
ip_address
Returns:Deprecated
Return type:unicode
Returns:The URLs of related subresources
Return type:unicode
rate_plan_sid
Returns:The SID of the RatePlan resource to which the Sim resource is assigned.
Return type:unicode
reset_status
Returns:The connectivity reset status of the SIM
Return type:SimInstance.ResetStatus
sid
Returns:The unique string that identifies the Sim resource
Return type:unicode
sms_fallback_method
Returns:Deprecated. The HTTP method we use to call sms_fallback_url
Return type:unicode
sms_fallback_url
Returns:Deprecated. The URL we call when an error occurs while retrieving or executing the TwiML requested from the sms_url
Return type:unicode
sms_method
Returns:Deprecated. The HTTP method we use to call sms_url
Return type:unicode
sms_url
Returns:Deprecated. The URL we call when the SIM-connected device sends an SMS message that is not a Command
Return type:unicode
status
Returns:The status of the Sim resource
Return type:SimInstance.Status
unique_name
Returns:An application-defined string that uniquely identifies the resource
Return type:unicode
update(unique_name=<object object>, callback_method=<object object>, callback_url=<object object>, friendly_name=<object object>, rate_plan=<object object>, status=<object object>, commands_callback_method=<object object>, commands_callback_url=<object object>, sms_fallback_method=<object object>, sms_fallback_url=<object object>, sms_method=<object object>, sms_url=<object object>, voice_fallback_method=<object object>, voice_fallback_url=<object object>, voice_method=<object object>, voice_url=<object object>, reset_status=<object object>, account_sid=<object object>)[source]

Update the SimInstance

Parameters:
  • unique_name (unicode) – An application-defined string that uniquely identifies the resource
  • callback_method (unicode) – The HTTP method we should use to call callback_url
  • callback_url (unicode) – The URL we should call when the Sim resource has finished updating
  • friendly_name (unicode) – A string to describe the Sim resource
  • rate_plan (unicode) – The SID or unique name of the RatePlan resource to which the Sim resource should be assigned
  • status (SimInstance.Status) – The new status of the Sim resource
  • commands_callback_method (unicode) – The HTTP method we should use to call commands_callback_url
  • commands_callback_url (unicode) – The URL we should call when the SIM sends a Command
  • sms_fallback_method (unicode) – The HTTP method we should use to call sms_fallback_url
  • sms_fallback_url (unicode) – The URL we should call when an error occurs while retrieving or executing the TwiML requested from sms_url
  • sms_method (unicode) – The HTTP method we should use to call sms_url
  • sms_url (unicode) – The URL we should call when the SIM-connected device sends an SMS message that is not a Command
  • voice_fallback_method (unicode) – Deprecated
  • voice_fallback_url (unicode) – Deprecated
  • voice_method (unicode) – Deprecated
  • voice_url (unicode) – Deprecated
  • reset_status (SimInstance.ResetStatus) – Initiate a connectivity reset on a SIM
  • account_sid (unicode) – The SID of the Account to which the Sim resource should belong
Returns:

The updated SimInstance

Return type:

twilio.rest.wireless.v1.sim.SimInstance

url
Returns:The absolute URL of the resource
Return type:unicode
usage_records

Access the usage_records

Returns:twilio.rest.wireless.v1.sim.usage_record.UsageRecordList
Return type:twilio.rest.wireless.v1.sim.usage_record.UsageRecordList
voice_fallback_method
Returns:Deprecated. The HTTP method we use to call voice_fallback_url
Return type:unicode
voice_fallback_url
Returns:Deprecated. The URL we call when an error occurs while retrieving or executing the TwiML requested from voice_url
Return type:unicode
voice_method
Returns:Deprecated. The HTTP method we use to call voice_url
Return type:unicode
voice_url
Returns:Deprecated. The URL we call when the SIM-connected device makes a voice call
Return type:unicode
class twilio.rest.wireless.v1.sim.SimList(version)[source]

Bases: twilio.base.list_resource.ListResource

get(sid)[source]

Constructs a SimContext

Parameters:sid – The SID of the Sim resource to fetch
Returns:twilio.rest.wireless.v1.sim.SimContext
Return type:twilio.rest.wireless.v1.sim.SimContext
get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of SimInstance
Return type:twilio.rest.wireless.v1.sim.SimPage
list(status=<object object>, iccid=<object object>, rate_plan=<object object>, e_id=<object object>, sim_registration_code=<object object>, limit=None, page_size=None)[source]

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

Parameters:
  • status (SimInstance.Status) – Only return Sim resources with this status
  • iccid (unicode) – Only return Sim resources with this ICCID
  • rate_plan (unicode) – Only return Sim resources assigned to this RatePlan resource
  • e_id (unicode) – Deprecated
  • sim_registration_code (unicode) – Only return Sim resources with this registration code
  • 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.sim.SimInstance]

page(status=<object object>, iccid=<object object>, rate_plan=<object object>, e_id=<object object>, sim_registration_code=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

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

Parameters:
  • status (SimInstance.Status) – Only return Sim resources with this status
  • iccid (unicode) – Only return Sim resources with this ICCID
  • rate_plan (unicode) – Only return Sim resources assigned to this RatePlan resource
  • e_id (unicode) – Deprecated
  • sim_registration_code (unicode) – Only return Sim resources with this registration code
  • 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 SimInstance

Return type:

twilio.rest.wireless.v1.sim.SimPage

stream(status=<object object>, iccid=<object object>, rate_plan=<object object>, e_id=<object object>, sim_registration_code=<object object>, limit=None, page_size=None)[source]

Streams SimInstance 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:
  • status (SimInstance.Status) – Only return Sim resources with this status
  • iccid (unicode) – Only return Sim resources with this ICCID
  • rate_plan (unicode) – Only return Sim resources assigned to this RatePlan resource
  • e_id (unicode) – Deprecated
  • sim_registration_code (unicode) – Only return Sim resources with this registration code
  • 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.sim.SimInstance]

class twilio.rest.wireless.v1.sim.SimPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of SimInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.wireless.v1.sim.SimInstance
Return type:twilio.rest.wireless.v1.sim.SimInstance