class Credigy::Response

Attributes

raw_response[R]
requester[R]

Public Class Methods

new(raw_response, requester) click to toggle source
# File lib/credigy/response.rb, line 8
def initialize(raw_response, requester)
  @raw_response = raw_response
  @requester = requester
end

Public Instance Methods

body() click to toggle source
# File lib/credigy/response.rb, line 13
def body
  raw_response.body[root_key][sub_root_key]
end
root_key() click to toggle source
# File lib/credigy/response.rb, line 17
def root_key
  "#{requester.operation}_response".to_sym
end
sub_root_key() click to toggle source
# File lib/credigy/response.rb, line 21
def sub_root_key
  "#{requester.operation}_result".to_sym
end