Class: Pickpoint::TokenPair
- Inherits:
-
Struct
- Object
- Struct
- Pickpoint::TokenPair
- Defined in:
- lib/pickpoint/mint.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#expires_at ⇒ Object
Returns the value of attribute expires_at.
-
#expires_in ⇒ Object
Returns the value of attribute expires_in.
-
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
-
#scopes ⇒ Object
Returns the value of attribute scopes.
Class Method Summary collapse
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token
6 7 8 |
# File 'lib/pickpoint/mint.rb', line 6 def access_token @access_token end |
#expires_at ⇒ Object
Returns the value of attribute expires_at
6 7 8 |
# File 'lib/pickpoint/mint.rb', line 6 def expires_at @expires_at end |
#expires_in ⇒ Object
Returns the value of attribute expires_in
6 7 8 |
# File 'lib/pickpoint/mint.rb', line 6 def expires_in @expires_in end |
#refresh_token ⇒ Object
Returns the value of attribute refresh_token
6 7 8 |
# File 'lib/pickpoint/mint.rb', line 6 def refresh_token @refresh_token end |
#scopes ⇒ Object
Returns the value of attribute scopes
6 7 8 |
# File 'lib/pickpoint/mint.rb', line 6 def scopes @scopes end |
Class Method Details
.from_hash(d) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/pickpoint/mint.rb', line 10 def self.from_hash(d) d = d.transform_keys(&:to_s) new( access_token: (d["accessToken"] || "").to_s, refresh_token: (d["refreshToken"] || "").to_s, expires_at: (d["expiresAt"] || 0).to_i, expires_in: (d["expiresIn"] || 0).to_i, scopes: Array(d["scopes"]) ) end |