Class: Zara4::API::Communication::Grant::RefreshTokenGrant
- Inherits:
-
GrantRequest
- Object
- GrantRequest
- Zara4::API::Communication::Grant::RefreshTokenGrant
- Defined in:
- lib/zara4/api/communication/grant/refresh_token_grant.rb
Instance Attribute Summary collapse
-
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
Attributes inherited from GrantRequest
#client_id, #client_secret, #scopes
Instance Method Summary collapse
-
#data ⇒ Object
Data to be sent when fetching grant tokens.
-
#grant_type ⇒ Object
The type of this grant.
-
#initialize(client_id, client_secret, refresh_token, scopes) ⇒ RefreshTokenGrant
constructor
A new instance of RefreshTokenGrant.
Methods inherited from GrantRequest
#get_tokens, #with_image_processing, #with_usage
Constructor Details
#initialize(client_id, client_secret, refresh_token, scopes) ⇒ RefreshTokenGrant
Returns a new instance of RefreshTokenGrant.
7 8 9 10 |
# File 'lib/zara4/api/communication/grant/refresh_token_grant.rb', line 7 def initialize(client_id, client_secret, refresh_token, scopes) super(client_id, client_secret, scopes) @refresh_token = refresh_token end |
Instance Attribute Details
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
4 5 6 |
# File 'lib/zara4/api/communication/grant/refresh_token_grant.rb', line 4 def refresh_token @refresh_token end |
Instance Method Details
#data ⇒ Object
Data to be sent when fetching grant tokens.
24 25 26 27 |
# File 'lib/zara4/api/communication/grant/refresh_token_grant.rb', line 24 def data data = super.data() data['refresh_token'] = @refresh_token end |
#grant_type ⇒ Object
The type of this grant.
16 17 18 |
# File 'lib/zara4/api/communication/grant/refresh_token_grant.rb', line 16 def grant_type return 'refresh_token' end |