Exception: DPay::CardPaymentError
- Defined in:
- lib/dpay/errors.rb,
sig/dpay/errors.rbs
Instance Attribute Summary
Attributes inherited from ApiError
#error_code, #field_errors, #http_status, #raw_body
Class Method Summary collapse
Methods inherited from ApiError
Constructor Details
This class inherits a constructor from DPay::ApiError
Class Method Details
.from_api(data) ⇒ CardPaymentError
71 72 73 74 75 |
# File 'lib/dpay/errors.rb', line 71 def self.from_api(data) = data["message"].is_a?(String) && !data["message"].empty? ? data["message"] : "Card payment rejected" new(, 200, , {}, Internal::PHP.json_encode(data)) end |