Class: Pago::V2026_04::Models::OrderFinalize
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Schema to finalize a draft order and trigger an off-session charge.
Constant Summary collapse
- JSON_KEYS =
{ payment_method_id: "payment_method_id" }.freeze
- REQUIRED_KEYS =
[].freeze
Instance Attribute Summary collapse
-
#payment_method_id ⇒ String?
readonly
ID of the payment method to charge.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(payment_method_id: ::Pago::UNSET) ⇒ OrderFinalize
constructor
A new instance of OrderFinalize.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(payment_method_id: ::Pago::UNSET) ⇒ OrderFinalize
Returns a new instance of OrderFinalize.
32444 32445 32446 32447 32448 32449 |
# File 'lib/pago/v2026_04/models.rb', line 32444 def initialize( payment_method_id: ::Pago::UNSET ) super() assign(:payment_method_id, payment_method_id) end |
Instance Attribute Details
#payment_method_id ⇒ String? (readonly)
ID of the payment method to charge. Must belong to the order's customer. Falls back to the customer's default payment method when unset.
32442 32443 32444 |
# File 'lib/pago/v2026_04/models.rb', line 32442 def payment_method_id @payment_method_id end |
Class Method Details
.from_json(data) ⇒ OrderFinalize?
32453 32454 32455 32456 32457 32458 32459 32460 32461 32462 32463 32464 |
# File 'lib/pago/v2026_04/models.rb', line 32453 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( payment_method_id: (data.key?("payment_method_id") ? data["payment_method_id"] : ::Pago::UNSET) ), data ) end |