Exception: AvataxClient::Errors::ApiError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/avatax_client/errors.rb

Overview

Encapsulates error responses from Avatax api calls.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response = { "error" => {} }) ⇒ void

Parameters:

  • response (Typhoeus::Response) (defaults to: { "error" => {} })

    response from api call.



10
11
12
13
# File 'lib/avatax_client/errors.rb', line 10

def initialize(response = { "error" => {} })
  @response = OpenStruct.new(response["error"])
  super
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



7
8
9
# File 'lib/avatax_client/errors.rb', line 7

def response
  @response
end