Class: Pago::V2026_04::Models::CustomerOrderConfirmPayment

Inherits:
Model
  • Object
show all
Defined in:
lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs

Overview

Schema to confirm a retry payment using either a saved payment method or a new confirmation token.

Constant Summary collapse

JSON_KEYS =

Returns:

  • (Hash[Symbol, String])
{
  confirmation_token_id: "confirmation_token_id",
  payment_method_id: "payment_method_id",
  payment_processor: "payment_processor"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
[].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw

Constructor Details

#initialize(confirmation_token_id: ::Pago::UNSET, payment_method_id: ::Pago::UNSET, payment_processor: ::Pago::UNSET) ⇒ CustomerOrderConfirmPayment

Returns a new instance of CustomerOrderConfirmPayment.

Parameters:

  • confirmation_token_id: (String, nil) (defaults to: ::Pago::UNSET)
  • payment_method_id: (String, nil) (defaults to: ::Pago::UNSET)
  • payment_processor: (String, nil) (defaults to: ::Pago::UNSET)


17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
# File 'lib/pago/v2026_04/models.rb', line 17592

def initialize(
  confirmation_token_id: ::Pago::UNSET,
  payment_method_id: ::Pago::UNSET,
  payment_processor: ::Pago::UNSET
)
  super()
  assign(:confirmation_token_id, confirmation_token_id)
  assign(:payment_method_id, payment_method_id)
  assign(:payment_processor, payment_processor)
end

Instance Attribute Details

#confirmation_token_idString? (readonly)

ID of the Stripe confirmation token for new payment methods.

Returns:

  • (String, nil)


17583
17584
17585
# File 'lib/pago/v2026_04/models.rb', line 17583

def confirmation_token_id
  @confirmation_token_id
end

#payment_method_idString? (readonly)

ID of an existing saved payment method.

Returns:

  • (String, nil)


17587
17588
17589
# File 'lib/pago/v2026_04/models.rb', line 17587

def payment_method_id
  @payment_method_id
end

#payment_processorString (readonly)

Returns:

  • (String)


17590
17591
17592
# File 'lib/pago/v2026_04/models.rb', line 17590

def payment_processor
  @payment_processor
end

Class Method Details

.from_json(data) ⇒ CustomerOrderConfirmPayment?

Parameters:

  • data (Hash, String, nil)

Returns:



17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
# File 'lib/pago/v2026_04/models.rb', line 17605

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(
      confirmation_token_id: (data.key?("confirmation_token_id") ? data["confirmation_token_id"] : ::Pago::UNSET),
      payment_method_id: (data.key?("payment_method_id") ? data["payment_method_id"] : ::Pago::UNSET),
      payment_processor: (data.key?("payment_processor") ? data["payment_processor"] : ::Pago::UNSET)
    ),
    data
  )
end