Exception: Pago::V2026_04::Errors::Finalize402Error
- Inherits:
-
PaymentRequiredError
- Object
- StandardError
- Error
- APIError
- ClientError
- PaymentRequiredError
- Pago::V2026_04::Errors::Finalize402Error
- Defined in:
- lib/pago/v2026_04/errors.rb,
sig/pago/v2026_04/generated.rbs
Overview
The charge failed, or requires customer authentication (e.g. a 3DS challenge) that can't be completed off-session. Raised on HTTP 402.
Constant Summary collapse
- STATUS_CODE =
402
Instance Attribute Summary
Attributes inherited from APIError
#body, #data, #response, #status_code
Class Method Summary collapse
-
.from_response(status_code:, body:, response:) ⇒ Models::PaymentFailed, Models::PaymentActionRequired
The deserialized error payload.
Methods inherited from APIError
Constructor Details
This class inherits a constructor from Pago::APIError
Class Method Details
.from_response(status_code:, body:, response:) ⇒ Models::PaymentFailed, Models::PaymentActionRequired
Returns the deserialized error payload.
326 327 328 329 330 331 332 333 334 |
# File 'lib/pago/v2026_04/errors.rb', line 326 def self.from_response(status_code:, body:, response:) new( "Pago API returned an error: #{status_code} - Finalize402Error", status_code: status_code, data: ::Pago::Serde.union(body, variants: [Models::PaymentFailed, Models::PaymentActionRequired]), body: body, response: response ) end |