Class: PayPal::RefreshTokenRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/core/token_requests.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(environment, authorization_code) ⇒ RefreshTokenRequest

Returns a new instance of RefreshTokenRequest.



27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/core/token_requests.rb', line 27

def initialize(environment, authorization_code)
  @path = "/v1/identity/openidconnect/tokenservice"
  @body = {
    :grant_type => "authorization_code",
    :code => authorization_code,
  }
  @headers = {
    "Content-Type" => "application/x-www-form-urlencoded",
    "Authorization" => environment.authorizationString(),
  }
  @verb = "POST"
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



25
26
27
# File 'lib/core/token_requests.rb', line 25

def body
  @body
end

#headersObject

Returns the value of attribute headers.



25
26
27
# File 'lib/core/token_requests.rb', line 25

def headers
  @headers
end

#pathObject

Returns the value of attribute path.



25
26
27
# File 'lib/core/token_requests.rb', line 25

def path
  @path
end

#verbObject

Returns the value of attribute verb.



25
26
27
# File 'lib/core/token_requests.rb', line 25

def verb
  @verb
end