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

Inherits:
InstanceResource
  • Object
show all
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

Constructor Details

#initialize(version, payload, service_sid: nil, identity: 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 SID identifier of the Service.

  • identity (String) (defaults to: nil)

    Customer unique identity for the Entity of the Service. This could be anything the customer wants, an email, a phone number, a Twitter handle, a site username, etc.



111
112
113
114
115
116
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/access_token.rb', line 111

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

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

Instance Method Details

#inspectObject

Provide a detailed, user friendly representation



132
133
134
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/access_token.rb', line 132

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

#to_sObject

Provide a user friendly representation



126
127
128
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/access_token.rb', line 126

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

#tokenString

Returns Generated access token.

Returns:

  • (String)

    Generated access token.



120
121
122
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/access_token.rb', line 120

def token
  @properties['token']
end