Class: FriendlyShipping::Services::TForceFreight::AccessToken
- Inherits:
-
AccessToken
- Object
- AccessToken
- FriendlyShipping::Services::TForceFreight::AccessToken
- Defined in:
- lib/friendly_shipping/services/tforce_freight/access_token.rb
Overview
Represents an access token returned by TForce Freight. The access token can be used to make API requests. Once it expires, a new token must be created.
Instance Attribute Summary collapse
-
#ext_expires_in ⇒ Integer
readonly
The token's extended expiration.
-
#token_type ⇒ String
readonly
The token's type.
Attributes inherited from AccessToken
Instance Method Summary collapse
-
#initialize(token_type:, ext_expires_in:, **other_kwargs) ⇒ AccessToken
constructor
A new instance of AccessToken.
Methods inherited from AccessToken
Constructor Details
#initialize(token_type:, ext_expires_in:, **other_kwargs) ⇒ AccessToken
Returns a new instance of AccessToken.
20 21 22 23 24 |
# File 'lib/friendly_shipping/services/tforce_freight/access_token.rb', line 20 def initialize(token_type:, ext_expires_in:, **other_kwargs) @token_type = token_type @ext_expires_in = ext_expires_in super(**other_kwargs) end |
Instance Attribute Details
#ext_expires_in ⇒ Integer (readonly)
Returns the token's extended expiration.
15 16 17 |
# File 'lib/friendly_shipping/services/tforce_freight/access_token.rb', line 15 def ext_expires_in @ext_expires_in end |
#token_type ⇒ String (readonly)
Returns the token's type.
12 13 14 |
# File 'lib/friendly_shipping/services/tforce_freight/access_token.rb', line 12 def token_type @token_type end |