Class: Vantiv::Api::Response

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/vantiv/api/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



8
9
10
# File 'lib/vantiv/api/response.rb', line 8

def body
  @body
end

#http_response_codeObject

Returns the value of attribute http_response_code.



8
9
10
# File 'lib/vantiv/api/response.rb', line 8

def http_response_code
  @http_response_code
end

#httpokObject

Returns the value of attribute httpok.



8
9
10
# File 'lib/vantiv/api/response.rb', line 8

def httpok
  @httpok
end

#raw_bodyObject

Returns the value of attribute raw_body.



8
9
10
# File 'lib/vantiv/api/response.rb', line 8

def raw_body
  @raw_body
end

Instance Method Details

#api_level_failure?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/vantiv/api/response.rb', line 12

def api_level_failure?
  !httpok || litle_response_has_error?
end

#error_messageObject



16
17
18
# File 'lib/vantiv/api/response.rb', line 16

def error_message
  api_level_failure? ? api_level_error_message : message
end