Class: Twilio::REST::Verify::V2::ServiceContext::AccessTokenList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Verify::V2::ServiceContext::AccessTokenList
- Defined in:
- lib/twilio-ruby/rest/verify/v2/service/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(identity: nil, factor_type: nil) ⇒ AccessTokenInstance
Create the AccessTokenInstance.
-
#initialize(version, service_sid: nil) ⇒ AccessTokenList
constructor
Initialize the AccessTokenList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, service_sid: nil) ⇒ AccessTokenList
Initialize the AccessTokenList
23 24 25 26 27 28 29 |
# File 'lib/twilio-ruby/rest/verify/v2/service/access_token.rb', line 23 def initialize(version, service_sid: nil) super(version) # Path Solution @solution = {service_sid: service_sid} @uri = "/Services/#{@solution[:service_sid]}/AccessTokens" end |
Instance Method Details
#create(identity: nil, factor_type: nil) ⇒ AccessTokenInstance
Create the AccessTokenInstance
39 40 41 42 43 44 45 |
# File 'lib/twilio-ruby/rest/verify/v2/service/access_token.rb', line 39 def create(identity: nil, factor_type: nil) data = Twilio::Values.of({'Identity' => identity, 'FactorType' => factor_type, }) payload = @version.create('POST', @uri, data: data) AccessTokenInstance.new(@version, payload, service_sid: @solution[:service_sid], ) end |
#to_s ⇒ Object
Provide a user friendly representation
49 50 51 |
# File 'lib/twilio-ruby/rest/verify/v2/service/access_token.rb', line 49 def to_s '#<Twilio.Verify.V2.AccessTokenList>' end |