Class: Twilio::REST::PreviewIam::V1::TokenInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::PreviewIam::V1::TokenInstance
- Defined in:
- lib/twilio-ruby/rest/preview_iam/v1/token.rb
Instance Method Summary collapse
-
#access_token ⇒ String
Token which carries the necessary information to access a Twilio resource directly.
- #expires_in ⇒ String
-
#id_token ⇒ String
Token which carries the information necessary of user profile.
-
#initialize(version, payload) ⇒ TokenInstance
constructor
Initialize the TokenInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#refresh_token ⇒ String
Token which carries the information necessary to get a new access token.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#token_type ⇒ String
Token type.
Constructor Details
#initialize(version, payload) ⇒ TokenInstance
Initialize the TokenInstance
240 241 242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/twilio-ruby/rest/preview_iam/v1/token.rb', line 240 def initialize(version, payload ) super(version) # Marshaled Properties @properties = { 'access_token' => payload['access_token'], 'refresh_token' => payload['refresh_token'], 'id_token' => payload['id_token'], 'token_type' => payload['token_type'], 'expires_in' => payload['expires_in'], } end |
Instance Method Details
#access_token ⇒ String
Returns Token which carries the necessary information to access a Twilio resource directly.
257 258 259 |
# File 'lib/twilio-ruby/rest/preview_iam/v1/token.rb', line 257 def access_token @properties['access_token'] end |
#expires_in ⇒ String
281 282 283 |
# File 'lib/twilio-ruby/rest/preview_iam/v1/token.rb', line 281 def expires_in @properties['expires_in'] end |
#id_token ⇒ String
Returns Token which carries the information necessary of user profile.
269 270 271 |
# File 'lib/twilio-ruby/rest/preview_iam/v1/token.rb', line 269 def id_token @properties['id_token'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
293 294 295 |
# File 'lib/twilio-ruby/rest/preview_iam/v1/token.rb', line 293 def inspect "<Twilio.PreviewIam.V1.TokenInstance>" end |
#refresh_token ⇒ String
Returns Token which carries the information necessary to get a new access token.
263 264 265 |
# File 'lib/twilio-ruby/rest/preview_iam/v1/token.rb', line 263 def refresh_token @properties['refresh_token'] end |
#to_s ⇒ Object
Provide a user friendly representation
287 288 289 |
# File 'lib/twilio-ruby/rest/preview_iam/v1/token.rb', line 287 def to_s "<Twilio.PreviewIam.V1.TokenInstance>" end |
#token_type ⇒ String
Returns Token type.
275 276 277 |
# File 'lib/twilio-ruby/rest/preview_iam/v1/token.rb', line 275 def token_type @properties['token_type'] end |