Class: Twilio::REST::Verify::V2::ServiceContext::AccessTokenInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Verify::V2::ServiceContext::AccessTokenInstance
- 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
-
#account_sid ⇒ String
Account Sid.
-
#context ⇒ AccessTokenContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#entity_identity ⇒ String
Unique external identifier of the Entity.
-
#factor_friendly_name ⇒ String
A human readable description of this factor.
-
#factor_type ⇒ access_token.FactorTypes
The Type of the Factor.
-
#fetch ⇒ AccessTokenInstance
Fetch the AccessTokenInstance.
-
#initialize(version, payload, service_sid: nil, sid: nil) ⇒ AccessTokenInstance
constructor
Initialize the AccessTokenInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#service_sid ⇒ String
Verify Service Sid.
-
#sid ⇒ String
A string that uniquely identifies this Access Token.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#token ⇒ String
Generated access token.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, service_sid: nil, sid: nil) ⇒ AccessTokenInstance
Initialize the AccessTokenInstance
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/twilio-ruby/rest/verify/v2/service/access_token.rb', line 148 def initialize(version, payload, service_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'service_sid' => payload['service_sid'], 'entity_identity' => payload['entity_identity'], 'factor_type' => payload['factor_type'], 'factor_friendly_name' => payload['factor_friendly_name'], 'token' => payload['token'], 'url' => payload['url'], } # Context @instance_context = nil @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns Account Sid.
187 188 189 |
# File 'lib/twilio-ruby/rest/verify/v2/service/access_token.rb', line 187 def account_sid @properties['account_sid'] end |
#context ⇒ AccessTokenContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
172 173 174 175 176 177 |
# File 'lib/twilio-ruby/rest/verify/v2/service/access_token.rb', line 172 def context unless @instance_context @instance_context = AccessTokenContext.new(@version, @params['service_sid'], @params['sid'], ) end @instance_context end |
#entity_identity ⇒ String
Returns Unique external identifier of the Entity.
199 200 201 |
# File 'lib/twilio-ruby/rest/verify/v2/service/access_token.rb', line 199 def entity_identity @properties['entity_identity'] end |
#factor_friendly_name ⇒ String
Returns A human readable description of this factor.
211 212 213 |
# File 'lib/twilio-ruby/rest/verify/v2/service/access_token.rb', line 211 def factor_friendly_name @properties['factor_friendly_name'] end |
#factor_type ⇒ access_token.FactorTypes
Returns The Type of the Factor.
205 206 207 |
# File 'lib/twilio-ruby/rest/verify/v2/service/access_token.rb', line 205 def factor_type @properties['factor_type'] end |
#fetch ⇒ AccessTokenInstance
Fetch the AccessTokenInstance
230 231 232 |
# File 'lib/twilio-ruby/rest/verify/v2/service/access_token.rb', line 230 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
243 244 245 246 |
# File 'lib/twilio-ruby/rest/verify/v2/service/access_token.rb', line 243 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Verify.V2.AccessTokenInstance #{values}>" end |
#service_sid ⇒ String
Returns Verify Service Sid.
193 194 195 |
# File 'lib/twilio-ruby/rest/verify/v2/service/access_token.rb', line 193 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns A string that uniquely identifies this Access Token.
181 182 183 |
# File 'lib/twilio-ruby/rest/verify/v2/service/access_token.rb', line 181 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
236 237 238 239 |
# File 'lib/twilio-ruby/rest/verify/v2/service/access_token.rb', line 236 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Verify.V2.AccessTokenInstance #{values}>" end |
#token ⇒ String
Returns Generated access token.
217 218 219 |
# File 'lib/twilio-ruby/rest/verify/v2/service/access_token.rb', line 217 def token @properties['token'] end |
#url ⇒ String
Returns The URL of this resource.
223 224 225 |
# File 'lib/twilio-ruby/rest/verify/v2/service/access_token.rb', line 223 def url @properties['url'] end |