Class: Pago::V2026_04::Models::CustomFieldUpdateSelect
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Schema to update a custom field of type select.
Constant Summary collapse
- JSON_KEYS =
{ metadata: "metadata", name: "name", slug: "slug", type: "type", properties: "properties" }.freeze
- REQUIRED_KEYS =
["type"].freeze
Instance Attribute Summary collapse
-
#metadata ⇒ Hash{String => String, Integer, Float, Boolean}
readonly
Key-value object allowing you to store additional information.
- #name ⇒ String? readonly
- #properties ⇒ Models::CustomFieldSelectProperties? readonly
- #slug ⇒ String? readonly
- #type ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: ::Pago::UNSET, name: ::Pago::UNSET, slug: ::Pago::UNSET, type:, properties: ::Pago::UNSET) ⇒ CustomFieldUpdateSelect
constructor
A new instance of CustomFieldUpdateSelect.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(metadata: ::Pago::UNSET, name: ::Pago::UNSET, slug: ::Pago::UNSET, type:, properties: ::Pago::UNSET) ⇒ CustomFieldUpdateSelect
Returns a new instance of CustomFieldUpdateSelect.
14608 14609 14610 14611 14612 14613 14614 14615 14616 14617 14618 14619 14620 14621 |
# File 'lib/pago/v2026_04/models.rb', line 14608 def initialize( metadata: ::Pago::UNSET, name: ::Pago::UNSET, slug: ::Pago::UNSET, type:, properties: ::Pago::UNSET ) super() assign(:metadata, ) assign(:name, name) assign(:slug, slug) assign(:type, type) assign(:properties, properties) end |
Instance Attribute Details
#metadata ⇒ Hash{String => String, Integer, Float, Boolean} (readonly)
Key-value object allowing you to store additional information.
The key must be a string with a maximum length of 40 characters. The value must be either:
- A string with a maximum length of 500 characters
- An integer
- A floating-point number
- A boolean
You can store up to 50 key-value pairs.
14594 14595 14596 |
# File 'lib/pago/v2026_04/models.rb', line 14594 def @metadata end |
#name ⇒ String? (readonly)
14597 14598 14599 |
# File 'lib/pago/v2026_04/models.rb', line 14597 def name @name end |
#properties ⇒ Models::CustomFieldSelectProperties? (readonly)
14606 14607 14608 |
# File 'lib/pago/v2026_04/models.rb', line 14606 def properties @properties end |
#slug ⇒ String? (readonly)
14600 14601 14602 |
# File 'lib/pago/v2026_04/models.rb', line 14600 def slug @slug end |
#type ⇒ String (readonly)
14603 14604 14605 |
# File 'lib/pago/v2026_04/models.rb', line 14603 def type @type end |
Class Method Details
.from_json(data) ⇒ CustomFieldUpdateSelect?
14625 14626 14627 14628 14629 14630 14631 14632 14633 14634 14635 14636 14637 14638 14639 14640 |
# File 'lib/pago/v2026_04/models.rb', line 14625 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( metadata: (data.key?("metadata") ? data["metadata"] : ::Pago::UNSET), name: (data.key?("name") ? data["name"] : ::Pago::UNSET), slug: (data.key?("slug") ? data["slug"] : ::Pago::UNSET), type: (data.key?("type") ? data["type"] : ::Pago::UNSET), properties: (data.key?("properties") ? Models::CustomFieldSelectProperties.from_json(data["properties"]) : ::Pago::UNSET) ), data ) end |