Class: PayU::OAuth::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/pay_u/o_auth/response.rb

Instance Method Summary collapse

Constructor Details

#initialize(response_body) ⇒ Response

Returns a new instance of Response.



4
5
6
# File 'lib/pay_u/o_auth/response.rb', line 4

def initialize(response_body)
  @response_body = response_body
end

Instance Method Details

#access_tokenObject



12
13
14
# File 'lib/pay_u/o_auth/response.rb', line 12

def access_token
  @response_body["access_token"]
end

#success?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/pay_u/o_auth/response.rb', line 8

def success?
  @response_body["error"].nil?
end