Class: Pago::V2026_04::Models::CustomerOrderPaymentConfirmation

Inherits:
Model
  • Object
show all
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 =

Returns:

  • (Hash[Symbol, String])
{
  status: "status",
  client_secret: "client_secret",
  error: "error"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["status"].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(status:, client_secret: ::Pago::UNSET, error: ::Pago::UNSET) ⇒ CustomerOrderPaymentConfirmation

Returns a new instance of CustomerOrderPaymentConfirmation.

Parameters:

  • status: (String)
  • client_secret: (String, nil) (defaults to: ::Pago::UNSET)
  • error: (String, nil) (defaults to: ::Pago::UNSET)


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_secretString? (readonly)

Client secret for handling additional actions.

Returns:

  • (String, nil)


17670
17671
17672
# File 'lib/pago/v2026_04/models.rb', line 17670

def client_secret
  @client_secret
end

#errorString? (readonly)

Error message if confirmation failed.

Returns:

  • (String, nil)


17674
17675
17676
# File 'lib/pago/v2026_04/models.rb', line 17674

def error
  @error
end

#statusString (readonly)

Payment status after confirmation.

Returns:

  • (String)


17666
17667
17668
# File 'lib/pago/v2026_04/models.rb', line 17666

def status
  @status
end

Class Method Details

.from_json(data) ⇒ CustomerOrderPaymentConfirmation?

Parameters:

  • data (Hash, String, nil)

Returns:



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