Class: Pago::V2026_04::Models::PaymentFailed
- Inherits:
-
Model
- Object
- Model
- Pago::V2026_04::Models::PaymentFailed
show all
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary
collapse
- JSON_KEYS =
{
error: "error",
detail: "detail"
}.freeze
- REQUIRED_KEYS =
["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:) ⇒ PaymentFailed
Returns a new instance of PaymentFailed.
35495
35496
35497
35498
35499
35500
35501
35502
|
# File 'lib/pago/v2026_04/models.rb', line 35495
def initialize(
error:,
detail:
)
super()
assign(:error, error)
assign(:detail, detail)
end
|
Instance Attribute Details
#detail ⇒ String
35493
35494
35495
|
# File 'lib/pago/v2026_04/models.rb', line 35493
def detail
@detail
end
|
#error ⇒ String
35490
35491
35492
|
# File 'lib/pago/v2026_04/models.rb', line 35490
def error
@error
end
|
Class Method Details
35506
35507
35508
35509
35510
35511
35512
35513
35514
35515
35516
35517
35518
|
# File 'lib/pago/v2026_04/models.rb', line 35506
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
|