Class: Pago::V2026_04::Models::CustomerPaymentMethodCreateSucceededResponse

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

Constant Summary collapse

JSON_KEYS =

Returns:

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

Returns:

  • (Array[String])
["status", "payment_method"].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:, payment_method:) ⇒ CustomerPaymentMethodCreateSucceededResponse

Returns a new instance of CustomerPaymentMethodCreateSucceededResponse.

Parameters:

  • status: (String)
  • payment_method: (Object)


18664
18665
18666
18667
18668
18669
18670
18671
# File 'lib/pago/v2026_04/models.rb', line 18664

def initialize(
  status:,
  payment_method:
)
  super()
  assign(:status, status)
  assign(:payment_method, payment_method)
end

Instance Attribute Details

#payment_methodObject (readonly)

Returns:

  • (Object)


18662
18663
18664
# File 'lib/pago/v2026_04/models.rb', line 18662

def payment_method
  @payment_method
end

#statusString (readonly)

Returns:

  • (String)


18659
18660
18661
# File 'lib/pago/v2026_04/models.rb', line 18659

def status
  @status
end

Class Method Details

.from_json(data) ⇒ CustomerPaymentMethodCreateSucceededResponse?

Parameters:

  • data (Hash, String, nil)

Returns:



18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
# File 'lib/pago/v2026_04/models.rb', line 18675

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),
      payment_method: (data.key?("payment_method") ? Unions::CustomerPaymentMethod.from_json(data["payment_method"]) : ::Pago::UNSET)
    ),
    data
  )
end