Class: Twilio::REST::Verify::V2::ServiceContext::EntityContext::AccessTokenList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Verify::V2::ServiceContext::EntityContext::AccessTokenList
- Defined in:
- lib/twilio-ruby/rest/verify/v2/service/entity/access_token.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(factor_type: nil) ⇒ AccessTokenInstance
Retrieve a single page of AccessTokenInstance records from the API.
-
#initialize(version, service_sid: nil, identity: nil) ⇒ AccessTokenList
constructor
Initialize the AccessTokenList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, service_sid: nil, identity: nil) ⇒ AccessTokenList
Initialize the AccessTokenList
26 27 28 29 30 31 32 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/access_token.rb', line 26 def initialize(version, service_sid: nil, identity: nil) super(version) # Path Solution @solution = {service_sid: service_sid, identity: identity} @uri = "/Services/#{@solution[:service_sid]}/Entities/#{@solution[:identity]}/AccessTokens" end |
Instance Method Details
#create(factor_type: nil) ⇒ AccessTokenInstance
Retrieve a single page of AccessTokenInstance records from the API. Request is executed immediately.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/access_token.rb', line 39 def create(factor_type: nil) data = Twilio::Values.of({'FactorType' => factor_type, }) payload = @version.create( 'POST', @uri, data: data ) AccessTokenInstance.new( @version, payload, service_sid: @solution[:service_sid], identity: @solution[:identity], ) end |
#to_s ⇒ Object
Provide a user friendly representation
58 59 60 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/access_token.rb', line 58 def to_s '#<Twilio.Verify.V2.AccessTokenList>' end |