Exception: AmexTokenizationClient::Request::UnexpectedHttpResponse

Inherits:
StandardError
  • Object
show all
Defined in:
lib/amex_tokenization_client/request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ UnexpectedHttpResponse

Returns a new instance of UnexpectedHttpResponse.



58
59
60
61
# File 'lib/amex_tokenization_client/request.rb', line 58

def initialize(response)
  @response = response
  super "#{response.message} (#{response.code}): #{response.body}"
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



56
57
58
# File 'lib/amex_tokenization_client/request.rb', line 56

def response
  @response
end