Class: Pago::V2026_04::Models::ExpiredCheckoutError

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])
{
  error: "error",
  detail: "detail"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["error", "detail"].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(error:, detail:) ⇒ ExpiredCheckoutError

Returns a new instance of ExpiredCheckoutError.

Parameters:

  • error: (String)
  • detail: (String)


25426
25427
25428
25429
25430
25431
25432
25433
# File 'lib/pago/v2026_04/models.rb', line 25426

def initialize(
  error:,
  detail:
)
  super()
  assign(:error, error)
  assign(:detail, detail)
end

Instance Attribute Details

#detailString (readonly)

Returns:

  • (String)


25424
25425
25426
# File 'lib/pago/v2026_04/models.rb', line 25424

def detail
  @detail
end

#errorString (readonly)

Returns:

  • (String)


25421
25422
25423
# File 'lib/pago/v2026_04/models.rb', line 25421

def error
  @error
end

Class Method Details

.from_json(data) ⇒ ExpiredCheckoutError?

Parameters:

  • data (Hash, String, nil)

Returns:



25437
25438
25439
25440
25441
25442
25443
25444
25445
25446
25447
25448
25449
# File 'lib/pago/v2026_04/models.rb', line 25437

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