Class: Pago::V2026_04::Models::CustomFieldSelectOption
- Inherits:
-
Model
- Object
- Model
- Pago::V2026_04::Models::CustomFieldSelectOption
show all
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary
collapse
- JSON_KEYS =
{
value: "value",
label: "label"
}.freeze
- REQUIRED_KEYS =
["value", "label"].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
Returns a new instance of CustomFieldSelectOption.
14114
14115
14116
14117
14118
14119
14120
14121
|
# File 'lib/pago/v2026_04/models.rb', line 14114
def initialize(
value:,
label:
)
super()
assign(:value, value)
assign(:label, label)
end
|
Instance Attribute Details
#label ⇒ String
14112
14113
14114
|
# File 'lib/pago/v2026_04/models.rb', line 14112
def label
@label
end
|
#value ⇒ String
14109
14110
14111
|
# File 'lib/pago/v2026_04/models.rb', line 14109
def value
@value
end
|
Class Method Details
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
|
# File 'lib/pago/v2026_04/models.rb', line 14125
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(
value: (data.key?("value") ? data["value"] : ::Pago::UNSET),
label: (data.key?("label") ? data["label"] : ::Pago::UNSET)
),
data
)
end
|