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

Submodules

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

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.verify.v2.service.entity.challenge.ChallengeContext(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.

fetch()[source]

Fetch the ChallengeInstance

Returns:The fetched ChallengeInstance
Return type:twilio.rest.verify.v2.service.entity.challenge.ChallengeInstance
update(auth_payload=<object object>)[source]

Update the ChallengeInstance

Parameters:auth_payload (unicode) – Optional payload to verify the Challenge
Returns:The updated ChallengeInstance
Return type:twilio.rest.verify.v2.service.entity.challenge.ChallengeInstance
class twilio.rest.verify.v2.service.entity.challenge.ChallengeInstance(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 ChallengeReasons[source]

Bases: object

NONE = 'none'
NOT_NEEDED = 'not_needed'
NOT_REQUESTED = 'not_requested'
class ChallengeStatuses[source]

Bases: object

APPROVED = 'approved'
DENIED = 'denied'
EXPIRED = 'expired'
PENDING = 'pending'
class FactorTypes[source]

Bases: object

PUSH = 'push'
account_sid
Returns:Account Sid.
Return type:unicode
date_created
Returns:The date this Challenge was created
Return type:datetime
date_responded
Returns:The date this Challenge was responded
Return type:datetime
date_updated
Returns:The date this Challenge was updated
Return type:datetime
details
Returns:Details about the Challenge.
Return type:dict
entity_sid
Returns:Entity Sid.
Return type:unicode
expiration_date
Returns:The date-time when this Challenge expires
Return type:datetime
factor_sid
Returns:Factor Sid.
Return type:unicode
factor_type
Returns:The Factor Type of this Challenge
Return type:ChallengeInstance.FactorTypes
fetch()[source]

Fetch the ChallengeInstance

Returns:The fetched ChallengeInstance
Return type:twilio.rest.verify.v2.service.entity.challenge.ChallengeInstance
hidden_details
Returns:Hidden details about the Challenge
Return type:dict
identity
Returns:Unique external identifier of the Entity
Return type:unicode
responded_reason
Returns:The Reason of this Challenge status
Return type:ChallengeInstance.ChallengeReasons
service_sid
Returns:Service Sid.
Return type:unicode
sid
Returns:A string that uniquely identifies this Challenge.
Return type:unicode
status
Returns:The Status of this Challenge
Return type:ChallengeInstance.ChallengeStatuses
update(auth_payload=<object object>)[source]

Update the ChallengeInstance

Parameters:auth_payload (unicode) – Optional payload to verify the Challenge
Returns:The updated ChallengeInstance
Return type:twilio.rest.verify.v2.service.entity.challenge.ChallengeInstance
url
Returns:The URL of this resource.
Return type:unicode
class twilio.rest.verify.v2.service.entity.challenge.ChallengeList(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(factor_sid, expiration_date=<object object>, details_message=<object object>, details_fields=<object object>, hidden_details=<object object>)[source]

Create the ChallengeInstance

Parameters:
  • factor_sid (unicode) – Factor Sid.
  • expiration_date (datetime) – The date-time when this Challenge expires
  • details_message (unicode) – Shown to the user when the push notification arrives
  • details_fields (list[dict]) – A list of objects that describe the Fields included in the Challenge
  • hidden_details (dict) – Hidden details provided to contextualize the Challenge
Returns:

The created ChallengeInstance

Return type:

twilio.rest.verify.v2.service.entity.challenge.ChallengeInstance

get(sid)[source]

Constructs a ChallengeContext

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

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of ChallengeInstance
Return type:twilio.rest.verify.v2.service.entity.challenge.ChallengePage
list(factor_sid=<object object>, status=<object object>, limit=None, page_size=None)[source]

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

Parameters:
  • factor_sid (unicode) – Factor Sid.
  • status (ChallengeInstance.ChallengeStatuses) – The Status of theChallenges to fetch
  • 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.challenge.ChallengeInstance]

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

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

Parameters:
  • factor_sid (unicode) – Factor Sid.
  • status (ChallengeInstance.ChallengeStatuses) – The Status of theChallenges to fetch
  • 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 ChallengeInstance

Return type:

twilio.rest.verify.v2.service.entity.challenge.ChallengePage

stream(factor_sid=<object object>, status=<object object>, limit=None, page_size=None)[source]

Streams ChallengeInstance 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:
  • factor_sid (unicode) – Factor Sid.
  • status (ChallengeInstance.ChallengeStatuses) – The Status of theChallenges to fetch
  • 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.challenge.ChallengeInstance]

class twilio.rest.verify.v2.service.entity.challenge.ChallengePage(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 ChallengeInstance

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

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

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
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>)[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
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'
class NotificationPlatforms[source]

Bases: object

APN = 'apn'
FCM = 'fcm'
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>)[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
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.

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>)[source]

Create the FactorInstance

Parameters:
  • friendly_name (unicode) – The friendly name of this Factor
  • factor_type (FactorInstance.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 (FactorInstance.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
Returns:

The created FactorInstance

Return type:

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

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

Module contents

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
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
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
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