Exception: DPay::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- DPay::ApiError
- Includes:
- Error
- Defined in:
- lib/dpay/errors.rb,
sig/dpay/errors.rbs
Direct Known Subclasses
AccessDeniedError, ApiServerError, AuthenticationError, CardPaymentError, InvalidRequestError, NotFoundError, PaymentRejectedError, RateLimitError
Instance Attribute Summary collapse
-
#error_code ⇒ String?
readonly
Returns the value of attribute error_code.
-
#field_errors ⇒ Hash[String, Array[String]]
readonly
Returns the value of attribute field_errors.
-
#http_status ⇒ Integer
readonly
Returns the value of attribute http_status.
-
#raw_body ⇒ String
readonly
Returns the value of attribute raw_body.
Instance Method Summary collapse
-
#initialize(message, http_status, error_code = nil, field_errors = {}, raw_body = "") ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(message, http_status, error_code = nil, field_errors = {}, raw_body = "") ⇒ ApiError
Returns a new instance of ApiError.
27 28 29 30 31 32 33 |
# File 'lib/dpay/errors.rb', line 27 def initialize(, http_status, error_code = nil, field_errors = {}, raw_body = "") super() @http_status = http_status @error_code = error_code @field_errors = field_errors @raw_body = raw_body end |
Instance Attribute Details
#error_code ⇒ String? (readonly)
Returns the value of attribute error_code.
25 26 27 |
# File 'lib/dpay/errors.rb', line 25 def error_code @error_code end |
#field_errors ⇒ Hash[String, Array[String]] (readonly)
Returns the value of attribute field_errors.
25 26 27 |
# File 'lib/dpay/errors.rb', line 25 def field_errors @field_errors end |
#http_status ⇒ Integer (readonly)
Returns the value of attribute http_status.
25 26 27 |
# File 'lib/dpay/errors.rb', line 25 def http_status @http_status end |
#raw_body ⇒ String (readonly)
Returns the value of attribute raw_body.
25 26 27 |
# File 'lib/dpay/errors.rb', line 25 def raw_body @raw_body end |