Class: Pago::V2026_04::Models::CustomerOrderPaymentConfirmation
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Response after confirming a retry payment.
Constant Summary collapse
- JSON_KEYS =
{ status: "status", client_secret: "client_secret", error: "error" }.freeze
- REQUIRED_KEYS =
["status"].freeze
Instance Attribute Summary collapse
-
#client_secret ⇒ String?
readonly
Client secret for handling additional actions.
-
#error ⇒ String?
readonly
Error message if confirmation failed.
-
#status ⇒ String
readonly
Payment status after confirmation.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(status:, client_secret: ::Pago::UNSET, error: ::Pago::UNSET) ⇒ CustomerOrderPaymentConfirmation
constructor
A new instance of CustomerOrderPaymentConfirmation.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(status:, client_secret: ::Pago::UNSET, error: ::Pago::UNSET) ⇒ CustomerOrderPaymentConfirmation
Returns a new instance of CustomerOrderPaymentConfirmation.
17676 17677 17678 17679 17680 17681 17682 17683 17684 17685 |
# File 'lib/pago/v2026_04/models.rb', line 17676 def initialize( status:, client_secret: ::Pago::UNSET, error: ::Pago::UNSET ) super() assign(:status, status) assign(:client_secret, client_secret) assign(:error, error) end |
Instance Attribute Details
#client_secret ⇒ String? (readonly)
Client secret for handling additional actions.
17670 17671 17672 |
# File 'lib/pago/v2026_04/models.rb', line 17670 def client_secret @client_secret end |
#error ⇒ String? (readonly)
Error message if confirmation failed.
17674 17675 17676 |
# File 'lib/pago/v2026_04/models.rb', line 17674 def error @error end |
#status ⇒ String (readonly)
Payment status after confirmation.
17666 17667 17668 |
# File 'lib/pago/v2026_04/models.rb', line 17666 def status @status end |
Class Method Details
.from_json(data) ⇒ CustomerOrderPaymentConfirmation?
17689 17690 17691 17692 17693 17694 17695 17696 17697 17698 17699 17700 17701 17702 |
# File 'lib/pago/v2026_04/models.rb', line 17689 def self.from_json(data) data = ::JSON.parse(data) if data.is_a?(String) data = ::Pago::Serde.object(data) return nil if data.nil? wrap_raw( new( status: (data.key?("status") ? data["status"] : ::Pago::UNSET), client_secret: (data.key?("client_secret") ? data["client_secret"] : ::Pago::UNSET), error: (data.key?("error") ? data["error"] : ::Pago::UNSET) ), data ) end |