Class: Twilio::REST::Verify::V2::ServiceContext::AccessTokenInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/verify/v2/service/access_token.rb

Overview

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, service_sid: nil) ⇒ AccessTokenInstance

Initialize the AccessTokenInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • service_sid (String) (defaults to: nil)

    The unique string that we created to identify the Service resource.


95
96
97
98
99
100
# File 'lib/twilio-ruby/rest/verify/v2/service/access_token.rb', line 95

def initialize(version, payload, service_sid: nil)
  super(version)

  # Marshaled Properties
  @properties = {'token' => payload['token'], }
end

Instance Method Details

#inspectObject

Provide a detailed, user friendly representation


116
117
118
# File 'lib/twilio-ruby/rest/verify/v2/service/access_token.rb', line 116

def inspect
  "<Twilio.Verify.V2.AccessTokenInstance>"
end

#to_sObject

Provide a user friendly representation


110
111
112
# File 'lib/twilio-ruby/rest/verify/v2/service/access_token.rb', line 110

def to_s
  "<Twilio.Verify.V2.AccessTokenInstance>"
end

#tokenString

Returns Generated access token.

Returns:

  • (String)

    Generated access token.


104
105
106
# File 'lib/twilio-ruby/rest/verify/v2/service/access_token.rb', line 104

def token
  @properties['token']
end