Class: SolidusPaypalCommercePlatform::AccessTokenAuthorizationRequest
- Inherits:
-
Object
- Object
- SolidusPaypalCommercePlatform::AccessTokenAuthorizationRequest
- Defined in:
- lib/solidus_paypal_commerce_platform/access_token_authorization_request.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#path ⇒ Object
Returns the value of attribute path.
-
#verb ⇒ Object
Returns the value of attribute verb.
Instance Method Summary collapse
-
#initialize(environment:, auth_code:, nonce:) ⇒ AccessTokenAuthorizationRequest
constructor
A new instance of AccessTokenAuthorizationRequest.
Constructor Details
permalink #initialize(environment:, auth_code:, nonce:) ⇒ AccessTokenAuthorizationRequest
Returns a new instance of AccessTokenAuthorizationRequest.
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/solidus_paypal_commerce_platform/access_token_authorization_request.rb', line 7 def initialize(environment:, auth_code:, nonce:) @verb = "POST" @path = "/v1/oauth2/token" @headers = { "Content-Type" => "application/x-www-form-urlencoded", "Authorization" => environment., } @body = { grant_type: "authorization_code", code: auth_code, code_verifier: nonce, } end |
Instance Attribute Details
permalink #body ⇒ Object
Returns the value of attribute body.
5 6 7 |
# File 'lib/solidus_paypal_commerce_platform/access_token_authorization_request.rb', line 5 def body @body end |
permalink #headers ⇒ Object
Returns the value of attribute headers.
5 6 7 |
# File 'lib/solidus_paypal_commerce_platform/access_token_authorization_request.rb', line 5 def headers @headers end |
permalink #path ⇒ Object
Returns the value of attribute path.
5 6 7 |
# File 'lib/solidus_paypal_commerce_platform/access_token_authorization_request.rb', line 5 def path @path end |
permalink #verb ⇒ Object
Returns the value of attribute verb.
5 6 7 |
# File 'lib/solidus_paypal_commerce_platform/access_token_authorization_request.rb', line 5 def verb @verb end |