Class: Pago::V2026_04::Models::CustomFieldUpdateCheckbox
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Schema to update a custom field of type checkbox.
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::CustomFieldCheckboxProperties? 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) ⇒ CustomFieldUpdateCheckbox
constructor
A new instance of CustomFieldUpdateCheckbox.
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) ⇒ CustomFieldUpdateCheckbox
Returns a new instance of CustomFieldUpdateCheckbox.
14392 14393 14394 14395 14396 14397 14398 14399 14400 14401 14402 14403 14404 14405 |
# File 'lib/pago/v2026_04/models.rb', line 14392 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.
14378 14379 14380 |
# File 'lib/pago/v2026_04/models.rb', line 14378 def @metadata end |
#name ⇒ String? (readonly)
14381 14382 14383 |
# File 'lib/pago/v2026_04/models.rb', line 14381 def name @name end |
#properties ⇒ Models::CustomFieldCheckboxProperties? (readonly)
14390 14391 14392 |
# File 'lib/pago/v2026_04/models.rb', line 14390 def properties @properties end |
#slug ⇒ String? (readonly)
14384 14385 14386 |
# File 'lib/pago/v2026_04/models.rb', line 14384 def slug @slug end |
#type ⇒ String (readonly)
14387 14388 14389 |
# File 'lib/pago/v2026_04/models.rb', line 14387 def type @type end |
Class Method Details
.from_json(data) ⇒ CustomFieldUpdateCheckbox?
14409 14410 14411 14412 14413 14414 14415 14416 14417 14418 14419 14420 14421 14422 14423 14424 |
# File 'lib/pago/v2026_04/models.rb', line 14409 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::CustomFieldCheckboxProperties.from_json(data["properties"]) : ::Pago::UNSET) ), data ) end |