Class: Pago::V2026_04::Models::CustomFieldUpdateNumber
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Schema to update a custom field of type number.
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::CustomFieldNumberProperties? 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) ⇒ CustomFieldUpdateNumber
constructor
A new instance of CustomFieldUpdateNumber.
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) ⇒ CustomFieldUpdateNumber
Returns a new instance of CustomFieldUpdateNumber.
14536 14537 14538 14539 14540 14541 14542 14543 14544 14545 14546 14547 14548 14549 |
# File 'lib/pago/v2026_04/models.rb', line 14536 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.
14522 14523 14524 |
# File 'lib/pago/v2026_04/models.rb', line 14522 def @metadata end |
#name ⇒ String? (readonly)
14525 14526 14527 |
# File 'lib/pago/v2026_04/models.rb', line 14525 def name @name end |
#properties ⇒ Models::CustomFieldNumberProperties? (readonly)
14534 14535 14536 |
# File 'lib/pago/v2026_04/models.rb', line 14534 def properties @properties end |
#slug ⇒ String? (readonly)
14528 14529 14530 |
# File 'lib/pago/v2026_04/models.rb', line 14528 def slug @slug end |
#type ⇒ String (readonly)
14531 14532 14533 |
# File 'lib/pago/v2026_04/models.rb', line 14531 def type @type end |
Class Method Details
.from_json(data) ⇒ CustomFieldUpdateNumber?
14553 14554 14555 14556 14557 14558 14559 14560 14561 14562 14563 14564 14565 14566 14567 14568 |
# File 'lib/pago/v2026_04/models.rb', line 14553 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::CustomFieldNumberProperties.from_json(data["properties"]) : ::Pago::UNSET) ), data ) end |