Class: Twilio::REST::Authy::V1::ServiceContext::EntityContext::FactorContext::ChallengeList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Authy::V1::ServiceContext::EntityContext::FactorContext::ChallengeList
- Defined in:
- lib/twilio-ruby/rest/authy/v1/service/entity/factor/challenge.rb
Overview
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].
Instance Method Summary collapse
-
#create(expiration_date: :unset, details: :unset, hidden_details: :unset) ⇒ ChallengeInstance
Retrieve a single page of ChallengeInstance records from the API.
-
#initialize(version, service_sid: nil, identity: nil, factor_sid: nil) ⇒ ChallengeList
constructor
Initialize the ChallengeList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, service_sid: nil, identity: nil, factor_sid: nil) ⇒ ChallengeList
Initialize the ChallengeList
27 28 29 30 31 32 33 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor/challenge.rb', line 27 def initialize(version, service_sid: nil, identity: nil, factor_sid: nil) super(version) # Path Solution @solution = {service_sid: service_sid, identity: identity, factor_sid: factor_sid} @uri = "/Services/#{@solution[:service_sid]}/Entities/#{@solution[:identity]}/Factors/#{@solution[:factor_sid]}/Challenges" end |
Instance Method Details
#create(expiration_date: :unset, details: :unset, hidden_details: :unset) ⇒ ChallengeInstance
Retrieve a single page of ChallengeInstance records from the API. Request is executed immediately.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor/challenge.rb', line 45 def create(expiration_date: :unset, details: :unset, hidden_details: :unset) data = Twilio::Values.of({ 'ExpirationDate' => Twilio.serialize_iso8601_datetime(expiration_date), 'Details' => details, 'HiddenDetails' => hidden_details, }) payload = @version.create( 'POST', @uri, data: data ) ChallengeInstance.new( @version, payload, service_sid: @solution[:service_sid], identity: @solution[:identity], factor_sid: @solution[:factor_sid], ) end |
#to_s ⇒ Object
Provide a user friendly representation
69 70 71 |
# File 'lib/twilio-ruby/rest/authy/v1/service/entity/factor/challenge.rb', line 69 def to_s '#<Twilio.Authy.V1.ChallengeList>' end |