Class: PayjpMock::Response::Error::Base
- Defined in:
- lib/payjp_mock/response/error/base.rb
Direct Known Subclasses
ApiConnectionError, ApiError, AuthenticationError, CardError, InvalidRequestError
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(code: nil, message: nil, param: nil) ⇒ Base
constructor
A new instance of Base.
Methods inherited from Base
Constructor Details
#initialize(code: nil, message: nil, param: nil) ⇒ Base
Returns a new instance of Base.
5 6 7 8 9 |
# File 'lib/payjp_mock/response/error/base.rb', line 5 def initialize(code: nil, message: nil, param: nil) @attributes = default_attributes.merge( { code: code, message: , param: param }.compact ) end |
Instance Method Details
#body ⇒ Object
11 12 13 |
# File 'lib/payjp_mock/response/error/base.rb', line 11 def body { error: @attributes }.to_json end |