Class: Buckaruby::ApiResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/buckaruby/response.rb

Overview

Base class for a response via the API.

Instance Attribute Summary

Attributes inherited from Response

#response

Instance Method Summary collapse

Methods inherited from Response

#additional, #custom, #params, #status, #timestamp

Constructor Details

#initialize(body, config) ⇒ ApiResponse

Returns a new instance of ApiResponse.



164
165
166
167
168
169
170
171
172
# File 'lib/buckaruby/response.rb', line 164

def initialize(body, config)
  super

  if api_result.nil? || api_result.casecmp('fail').zero?
    raise ApiException, params
  end

  Signature.verify!(config, response)
end