Class: Pago::V2026_04::Models::CustomFieldUpdateText
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Schema to update a custom field of type text.
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::CustomFieldTextProperties? 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) ⇒ CustomFieldUpdateText
constructor
A new instance of CustomFieldUpdateText.
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) ⇒ CustomFieldUpdateText
Returns a new instance of CustomFieldUpdateText.
14680 14681 14682 14683 14684 14685 14686 14687 14688 14689 14690 14691 14692 14693 |
# File 'lib/pago/v2026_04/models.rb', line 14680 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.
14666 14667 14668 |
# File 'lib/pago/v2026_04/models.rb', line 14666 def @metadata end |
#name ⇒ String? (readonly)
14669 14670 14671 |
# File 'lib/pago/v2026_04/models.rb', line 14669 def name @name end |
#properties ⇒ Models::CustomFieldTextProperties? (readonly)
14678 14679 14680 |
# File 'lib/pago/v2026_04/models.rb', line 14678 def properties @properties end |
#slug ⇒ String? (readonly)
14672 14673 14674 |
# File 'lib/pago/v2026_04/models.rb', line 14672 def slug @slug end |
#type ⇒ String (readonly)
14675 14676 14677 |
# File 'lib/pago/v2026_04/models.rb', line 14675 def type @type end |
Class Method Details
.from_json(data) ⇒ CustomFieldUpdateText?
14697 14698 14699 14700 14701 14702 14703 14704 14705 14706 14707 14708 14709 14710 14711 14712 |
# File 'lib/pago/v2026_04/models.rb', line 14697 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::CustomFieldTextProperties.from_json(data["properties"]) : ::Pago::UNSET) ), data ) end |