Class: AmazonDrs::AccessToken
- Defined in:
- lib/amazon-drs/access_token.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#expires_in ⇒ Object
Returns the value of attribute expires_in.
-
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
-
#token_type ⇒ Object
Returns the value of attribute token_type.
Attributes inherited from Base
#date, #error_description_url, #error_type, #request_id, #status_code
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from AmazonDrs::Base
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
5 6 7 |
# File 'lib/amazon-drs/access_token.rb', line 5 def access_token @access_token end |
#expires_in ⇒ Object
Returns the value of attribute expires_in.
5 6 7 |
# File 'lib/amazon-drs/access_token.rb', line 5 def expires_in @expires_in end |
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
5 6 7 |
# File 'lib/amazon-drs/access_token.rb', line 5 def refresh_token @refresh_token end |
#token_type ⇒ Object
Returns the value of attribute token_type.
5 6 7 |
# File 'lib/amazon-drs/access_token.rb', line 5 def token_type @token_type end |
Instance Method Details
#parse_body(body) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/amazon-drs/access_token.rb', line 7 def parse_body(body) json = JSON.parse(body) @access_token = json['access_token'] @refresh_token = json['refresh_token'] @token_type = json['token_type'] @expires_in = json['expires_in'] end |