class PayU::OAuth::Authorization
Constants
- ENDPOINT
- GRANT_TYPE
Public Class Methods
new(http_client, client_id, client_secret)
click to toggle source
# File lib/pay_u/o_auth/authorization.rb, line 11 def initialize(http_client, client_id, client_secret) @http_client = http_client @client_id = client_id @client_secret = client_secret end
Public Instance Methods
access_token()
click to toggle source
# File lib/pay_u/o_auth/authorization.rb, line 17 def access_token response = authorize raise UnauthorizedError unless response.success? authorize.access_token end
Private Instance Methods
fetch_response()
click to toggle source
# File lib/pay_u/o_auth/authorization.rb, line 29 def fetch_response @http_client.post_form(ENDPOINT, authorization_options) end