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

Submodules

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

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.verify.v2.service.entity.challenge.notification.NotificationInstance(version, payload, service_sid, identity, challenge_sid)[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
challenge_sid
Returns:Challenge Sid.
Return type:unicode
date_created
Returns:The date this Notification was created
Return type:datetime
entity_sid
Returns:Entity Sid.
Return type:unicode
identity
Returns:Unique external identifier of the Entity
Return type:unicode
priority
Returns:The priority of the notification.
Return type:unicode
service_sid
Returns:Service Sid.
Return type:unicode
sid
Returns:A string that uniquely identifies this Notification.
Return type:unicode
ttl
Returns:How long, in seconds, the notification is valid.
Return type:unicode
class twilio.rest.verify.v2.service.entity.challenge.notification.NotificationList(version, service_sid, identity, challenge_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(ttl=<object object>)[source]

Create the NotificationInstance

Parameters:ttl (unicode) – How long, in seconds, the notification is valid.
Returns:The created NotificationInstance
Return type:twilio.rest.verify.v2.service.entity.challenge.notification.NotificationInstance
class twilio.rest.verify.v2.service.entity.challenge.notification.NotificationPage(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 NotificationInstance

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

Module contents

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
notifications

Access the notifications

Returns:twilio.rest.verify.v2.service.entity.challenge.notification.NotificationList
Return type:twilio.rest.verify.v2.service.entity.challenge.notification.NotificationList
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'
TOTP = 'totp'
class ListOrders[source]

Bases: object

ASC = 'asc'
DESC = 'desc'
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
Returns:Nested resource URLs.
Return type:unicode
notifications

Access the notifications

Returns:twilio.rest.verify.v2.service.entity.challenge.notification.NotificationList
Return type:twilio.rest.verify.v2.service.entity.challenge.notification.NotificationList
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>, auth_payload=<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
  • auth_payload (unicode) – Optional payload to verify 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>, order=<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
  • order (ChallengeInstance.ListOrders) – The sort order of the Challenges list
  • 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>, order=<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
  • order (ChallengeInstance.ListOrders) – The sort order of the Challenges list
  • 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>, order=<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
  • order (ChallengeInstance.ListOrders) – The sort order of the Challenges list
  • 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