class PayPal::AccessTokenRequest
Attributes
body[RW]
headers[RW]
path[RW]
verb[RW]
Public Class Methods
new(environment, refreshToken = nil)
click to toggle source
# File lib/core/token_requests.rb, line 5 def initialize(environment, refreshToken = nil) @path = "/v1/oauth2/token" @body = { :grant_type => "client_credentials", } if (refreshToken) @body[:grant_type] = "refresh_token" @body[:refresh_token] = refreshToken end @headers = { "Content-Type" => "application/x-www-form-urlencoded", "Authorization" => environment.authorizationString(), } @verb = "POST" end