Class: Pago::V2026_04::Models::OrderNotDraft
- Inherits:
-
Model
- Object
- Model
- Pago::V2026_04::Models::OrderNotDraft
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:) ⇒ OrderNotDraft
Returns a new instance of OrderNotDraft.
32604
32605
32606
32607
32608
32609
32610
32611
|
# File 'lib/pago/v2026_04/models.rb', line 32604
def initialize(
error:,
detail:
)
super()
assign(:error, error)
assign(:detail, detail)
end
|
Instance Attribute Details
#detail ⇒ String
32602
32603
32604
|
# File 'lib/pago/v2026_04/models.rb', line 32602
def detail
@detail
end
|
#error ⇒ String
32599
32600
32601
|
# File 'lib/pago/v2026_04/models.rb', line 32599
def error
@error
end
|
Class Method Details
32615
32616
32617
32618
32619
32620
32621
32622
32623
32624
32625
32626
32627
|
# File 'lib/pago/v2026_04/models.rb', line 32615
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
|