Class: Pago::V2026_04::Models::CustomFieldUpdateDate
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Schema to update a custom field of type date.
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::CustomFieldDateProperties? 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) ⇒ CustomFieldUpdateDate
constructor
A new instance of CustomFieldUpdateDate.
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) ⇒ CustomFieldUpdateDate
Returns a new instance of CustomFieldUpdateDate.
14464 14465 14466 14467 14468 14469 14470 14471 14472 14473 14474 14475 14476 14477 |
# File 'lib/pago/v2026_04/models.rb', line 14464 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.
14450 14451 14452 |
# File 'lib/pago/v2026_04/models.rb', line 14450 def @metadata end |
#name ⇒ String? (readonly)
14453 14454 14455 |
# File 'lib/pago/v2026_04/models.rb', line 14453 def name @name end |
#properties ⇒ Models::CustomFieldDateProperties? (readonly)
14462 14463 14464 |
# File 'lib/pago/v2026_04/models.rb', line 14462 def properties @properties end |
#slug ⇒ String? (readonly)
14456 14457 14458 |
# File 'lib/pago/v2026_04/models.rb', line 14456 def slug @slug end |
#type ⇒ String (readonly)
14459 14460 14461 |
# File 'lib/pago/v2026_04/models.rb', line 14459 def type @type end |
Class Method Details
.from_json(data) ⇒ CustomFieldUpdateDate?
14481 14482 14483 14484 14485 14486 14487 14488 14489 14490 14491 14492 14493 14494 14495 14496 |
# File 'lib/pago/v2026_04/models.rb', line 14481 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::CustomFieldDateProperties.from_json(data["properties"]) : ::Pago::UNSET) ), data ) end |