twilio.rest.verify.v2.service.entity package

Submodules

twilio.rest.verify.v2.service.entity.factor module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/verify/v2/service/entity/factor.py:docstring of twilio.rest.verify.v2.service.entity.factor, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.verify.v2.service.entity.factor.FactorContext(version, service_sid, identity, 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 FactorInstance

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

Fetch the FactorInstance

Returns:The fetched FactorInstance
Return type:twilio.rest.verify.v2.service.entity.factor.FactorInstance
update(auth_payload=<object object>, friendly_name=<object object>, config_notification_token=<object object>, config_sdk_version=<object object>, config_time_step=<object object>, config_skew=<object object>, config_code_length=<object object>, config_alg=<object object>, config_notification_platform=<object object>)[source]

Update the FactorInstance

Parameters:
  • auth_payload (unicode) – Optional payload to verify the Factor for the first time
  • friendly_name (unicode) – The friendly name of this Factor
  • config_notification_token (unicode) – For APN, the device token. For FCM, the registration token
  • config_sdk_version (unicode) – The Verify Push SDK version used to configure the factor
  • config_time_step (unicode) – How often, in seconds, are TOTP codes generated
  • config_skew (unicode) – The number of past and future time-steps valid at a given time
  • config_code_length (unicode) – Number of digits for generated TOTP codes
  • config_alg (FactorInstance.TotpAlgorithms) – The algorithm used to derive the TOTP codes
  • config_notification_platform (unicode) – The transport technology used to generate the Notification Token
Returns:

The updated FactorInstance

Return type:

twilio.rest.verify.v2.service.entity.factor.FactorInstance

class twilio.rest.verify.v2.service.entity.factor.FactorInstance(version, payload, service_sid, identity, 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.

class FactorStatuses[source]

Bases: object

UNVERIFIED = 'unverified'
VERIFIED = 'verified'
class FactorTypes[source]

Bases: object

PUSH = 'push'
TOTP = 'totp'
class NotificationPlatforms[source]

Bases: object

APN = 'apn'
FCM = 'fcm'
NONE = 'none'
class TotpAlgorithms[source]

Bases: object

SHA1 = 'sha1'
SHA256 = 'sha256'
SHA512 = 'sha512'
account_sid
Returns:Account Sid.
Return type:unicode
config
Returns:Configurations for a factor_type.
Return type:dict
date_created
Returns:The date this Factor was created
Return type:datetime
date_updated
Returns:The date this Factor was updated
Return type:datetime
delete()[source]

Deletes the FactorInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
entity_sid
Returns:Entity Sid.
Return type:unicode
factor_type
Returns:The Type of this Factor
Return type:FactorInstance.FactorTypes
fetch()[source]

Fetch the FactorInstance

Returns:The fetched FactorInstance
Return type:twilio.rest.verify.v2.service.entity.factor.FactorInstance
friendly_name
Returns:A human readable description of this resource.
Return type:unicode
identity
Returns:Unique external identifier of the Entity
Return type:unicode
service_sid
Returns:Service Sid.
Return type:unicode
sid
Returns:A string that uniquely identifies this Factor.
Return type:unicode
status
Returns:The Status of this Factor
Return type:FactorInstance.FactorStatuses
update(auth_payload=<object object>, friendly_name=<object object>, config_notification_token=<object object>, config_sdk_version=<object object>, config_time_step=<object object>, config_skew=<object object>, config_code_length=<object object>, config_alg=<object object>, config_notification_platform=<object object>)[source]

Update the FactorInstance

Parameters:
  • auth_payload (unicode) – Optional payload to verify the Factor for the first time
  • friendly_name (unicode) – The friendly name of this Factor
  • config_notification_token (unicode) – For APN, the device token. For FCM, the registration token
  • config_sdk_version (unicode) – The Verify Push SDK version used to configure the factor
  • config_time_step (unicode) – How often, in seconds, are TOTP codes generated
  • config_skew (unicode) – The number of past and future time-steps valid at a given time
  • config_code_length (unicode) – Number of digits for generated TOTP codes
  • config_alg (FactorInstance.TotpAlgorithms) – The algorithm used to derive the TOTP codes
  • config_notification_platform (unicode) – The transport technology used to generate the Notification Token
Returns:

The updated FactorInstance

Return type:

twilio.rest.verify.v2.service.entity.factor.FactorInstance

url
Returns:The URL of this resource.
Return type:unicode
class twilio.rest.verify.v2.service.entity.factor.FactorList(version, service_sid, identity)[source]

Bases: twilio.base.list_resource.ListResource

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

get(sid)[source]

Constructs a FactorContext

Parameters:sid – A string that uniquely identifies this Factor.
Returns:twilio.rest.verify.v2.service.entity.factor.FactorContext
Return type:twilio.rest.verify.v2.service.entity.factor.FactorContext
get_page(target_url)[source]

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

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

Lists FactorInstance 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.entity.factor.FactorInstance]

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

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

Return type:

twilio.rest.verify.v2.service.entity.factor.FactorPage

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

Streams FactorInstance 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.entity.factor.FactorInstance]

class twilio.rest.verify.v2.service.entity.factor.FactorPage(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 FactorInstance

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

twilio.rest.verify.v2.service.entity.new_factor module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/verify/v2/service/entity/new_factor.py:docstring of twilio.rest.verify.v2.service.entity.new_factor, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.verify.v2.service.entity.new_factor.NewFactorInstance(version, payload, service_sid, identity)[source]

Bases: twilio.base.instance_resource.InstanceResource

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

class FactorStatuses[source]

Bases: object

UNVERIFIED = 'unverified'
VERIFIED = 'verified'
class FactorTypes[source]

Bases: object

PUSH = 'push'
TOTP = 'totp'
class NotificationPlatforms[source]

Bases: object

APN = 'apn'
FCM = 'fcm'
NONE = 'none'
class TotpAlgorithms[source]

Bases: object

SHA1 = 'sha1'
SHA256 = 'sha256'
SHA512 = 'sha512'
account_sid
Returns:Account Sid.
Return type:unicode
binding
Returns:Unique external identifier of the Entity
Return type:dict
config
Returns:Binding for a factor_type.
Return type:dict
date_created
Returns:The date this Factor was created
Return type:datetime
date_updated
Returns:The date this Factor was updated
Return type:datetime
entity_sid
Returns:Entity Sid.
Return type:unicode
factor_type
Returns:The Type of this Factor
Return type:NewFactorInstance.FactorTypes
friendly_name
Returns:A human readable description of this resource.
Return type:unicode
identity
Returns:Unique external identifier of the Entity
Return type:unicode
service_sid
Returns:Service Sid.
Return type:unicode
sid
Returns:A string that uniquely identifies this Factor.
Return type:unicode
status
Returns:The Status of this Factor
Return type:NewFactorInstance.FactorStatuses
url
Returns:The URL of this resource.
Return type:unicode
class twilio.rest.verify.v2.service.entity.new_factor.NewFactorList(version, service_sid, identity)[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(friendly_name, factor_type, binding_alg=<object object>, binding_public_key=<object object>, config_app_id=<object object>, config_notification_platform=<object object>, config_notification_token=<object object>, config_sdk_version=<object object>, binding_secret=<object object>, config_time_step=<object object>, config_skew=<object object>, config_code_length=<object object>, config_alg=<object object>)[source]

Create the NewFactorInstance

Parameters:
  • friendly_name (unicode) – The friendly name of this Factor
  • factor_type (NewFactorInstance.FactorTypes) – The Type of this Factor
  • binding_alg (unicode) – The algorithm used when factor_type is push
  • binding_public_key (unicode) – The public key encoded in Base64
  • config_app_id (unicode) – The ID that uniquely identifies your app in the Google or Apple store
  • config_notification_platform (NewFactorInstance.NotificationPlatforms) – The transport technology used to generate the Notification Token
  • config_notification_token (unicode) – For APN, the device token. For FCM, the registration token
  • config_sdk_version (unicode) – The Verify Push SDK version used to configure the factor
  • binding_secret (unicode) – The shared secret in Base32
  • config_time_step (unicode) – How often, in seconds, are TOTP codes generated
  • config_skew (unicode) – The number of past and future time-steps valid at a given time
  • config_code_length (unicode) – Number of digits for generated TOTP codes
  • config_alg (NewFactorInstance.TotpAlgorithms) – The algorithm used to derive the TOTP codes
Returns:

The created NewFactorInstance

Return type:

twilio.rest.verify.v2.service.entity.new_factor.NewFactorInstance

class twilio.rest.verify.v2.service.entity.new_factor.NewFactorPage(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 NewFactorInstance

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

Module contents

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

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/verify/v2/service/entity/__init__.py:docstring of twilio.rest.verify.v2.service.entity, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.verify.v2.service.entity.EntityContext(version, service_sid, identity)[source]

Bases: twilio.base.instance_context.InstanceContext

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

challenges

Access the challenges

Returns:twilio.rest.verify.v2.service.entity.challenge.ChallengeList
Return type:twilio.rest.verify.v2.service.entity.challenge.ChallengeList
delete()[source]

Deletes the EntityInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
factors

Access the factors

Returns:twilio.rest.verify.v2.service.entity.factor.FactorList
Return type:twilio.rest.verify.v2.service.entity.factor.FactorList
fetch()[source]

Fetch the EntityInstance

Returns:The fetched EntityInstance
Return type:twilio.rest.verify.v2.service.entity.EntityInstance
new_factors

Access the new_factors

Returns:twilio.rest.verify.v2.service.entity.new_factor.NewFactorList
Return type:twilio.rest.verify.v2.service.entity.new_factor.NewFactorList
class twilio.rest.verify.v2.service.entity.EntityInstance(version, payload, service_sid, identity=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
challenges

Access the challenges

Returns:twilio.rest.verify.v2.service.entity.challenge.ChallengeList
Return type:twilio.rest.verify.v2.service.entity.challenge.ChallengeList
date_created
Returns:The date this Entity was created
Return type:datetime
date_updated
Returns:The date this Entity was updated
Return type:datetime
delete()[source]

Deletes the EntityInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
factors

Access the factors

Returns:twilio.rest.verify.v2.service.entity.factor.FactorList
Return type:twilio.rest.verify.v2.service.entity.factor.FactorList
fetch()[source]

Fetch the EntityInstance

Returns:The fetched EntityInstance
Return type:twilio.rest.verify.v2.service.entity.EntityInstance
identity
Returns:Unique external identifier of the Entity
Return type:unicode
Returns:Nested resource URLs.
Return type:unicode
new_factors

Access the new_factors

Returns:twilio.rest.verify.v2.service.entity.new_factor.NewFactorList
Return type:twilio.rest.verify.v2.service.entity.new_factor.NewFactorList
service_sid
Returns:Service Sid.
Return type:unicode
sid
Returns:A string that uniquely identifies this Entity.
Return type:unicode
url
Returns:The URL of this resource.
Return type:unicode
class twilio.rest.verify.v2.service.entity.EntityList(version, service_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(identity)[source]

Create the EntityInstance

Parameters:identity (unicode) – Unique external identifier of the Entity
Returns:The created EntityInstance
Return type:twilio.rest.verify.v2.service.entity.EntityInstance
get(identity)[source]

Constructs a EntityContext

Parameters:identity – Unique external identifier of the Entity
Returns:twilio.rest.verify.v2.service.entity.EntityContext
Return type:twilio.rest.verify.v2.service.entity.EntityContext
get_page(target_url)[source]

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

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

Lists EntityInstance 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.entity.EntityInstance]

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

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

Return type:

twilio.rest.verify.v2.service.entity.EntityPage

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

Streams EntityInstance 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.entity.EntityInstance]

class twilio.rest.verify.v2.service.entity.EntityPage(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 EntityInstance

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