Exception: RubyPayler::UnexpectedResponseError
- Defined in:
- lib/ruby_payler/errors.rb
Overview
Unexpected response
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #body ⇒ Object
- #code ⇒ Object
-
#initialize(response) ⇒ UnexpectedResponseError
constructor
A new instance of UnexpectedResponseError.
- #message ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(response) ⇒ UnexpectedResponseError
Returns a new instance of UnexpectedResponseError.
40 41 42 |
# File 'lib/ruby_payler/errors.rb', line 40 def initialize(response) @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
38 39 40 |
# File 'lib/ruby_payler/errors.rb', line 38 def response @response end |
Instance Method Details
#body ⇒ Object
48 49 50 |
# File 'lib/ruby_payler/errors.rb', line 48 def body @body ||= response.body end |
#code ⇒ Object
44 45 46 |
# File 'lib/ruby_payler/errors.rb', line 44 def code @code ||= response.status end |
#message ⇒ Object
52 53 54 |
# File 'lib/ruby_payler/errors.rb', line 52 def "Unexpected response: code - #{code}, body - #{body}" end |
#to_s ⇒ Object
56 57 58 |
# File 'lib/ruby_payler/errors.rb', line 56 def to_s end |