Exception: Paymongo::Errors::BaseError
- Inherits:
-
StandardError
- Object
- StandardError
- Paymongo::Errors::BaseError
- Defined in:
- lib/paymongo/errors/base_error.rb
Direct Known Subclasses
AuthenticationError, InvalidRequestError, ResourceNotFoundError
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(data) ⇒ BaseError
constructor
A new instance of BaseError.
Constructor Details
#initialize(data) ⇒ BaseError
Returns a new instance of BaseError.
7 8 9 10 11 12 13 |
# File 'lib/paymongo/errors/base_error.rb', line 7 def initialize(data) @data = data @errors = data['errors'].map do |error| PaymongoError.new(error) end end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
4 5 6 |
# File 'lib/paymongo/errors/base_error.rb', line 4 def data @data end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
4 5 6 |
# File 'lib/paymongo/errors/base_error.rb', line 4 def errors @errors end |