Class: Pago::V2026_04::Models::CustomFieldText
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Schema for a custom field of type text.
Constant Summary collapse
- JSON_KEYS =
{ created_at: "created_at", modified_at: "modified_at", id: "id", metadata: "metadata", type: "type", slug: "slug", name: "name", organization_id: "organization_id", properties: "properties" }.freeze
- REQUIRED_KEYS =
["created_at", "modified_at", "id", "metadata", "type", "slug", "name", "organization_id", "properties"].freeze
Instance Attribute Summary collapse
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
-
#id ⇒ String
readonly
The ID of the object.
- #metadata ⇒ Hash{String => String, Integer, Float, Boolean} readonly
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
-
#name ⇒ String
readonly
Name of the custom field.
-
#organization_id ⇒ String
readonly
The ID of the organization owning the custom field.
- #properties ⇒ Models::CustomFieldTextProperties readonly
-
#slug ⇒ String
readonly
Identifier of the custom field.
- #type ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(created_at:, modified_at:, id:, metadata:, type:, slug:, name:, organization_id:, properties:) ⇒ CustomFieldText
constructor
A new instance of CustomFieldText.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(created_at:, modified_at:, id:, metadata:, type:, slug:, name:, organization_id:, properties:) ⇒ CustomFieldText
Returns a new instance of CustomFieldText.
14241 14242 14243 14244 14245 14246 14247 14248 14249 14250 14251 14252 14253 14254 14255 14256 14257 14258 14259 14260 14261 14262 |
# File 'lib/pago/v2026_04/models.rb', line 14241 def initialize( created_at:, modified_at:, id:, metadata:, type:, slug:, name:, organization_id:, properties: ) super() assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:id, id) assign(:metadata, ) assign(:type, type) assign(:slug, slug) assign(:name, name) assign(:organization_id, organization_id) assign(:properties, properties) end |
Instance Attribute Details
#created_at ⇒ String (readonly)
Creation timestamp of the object.
14210 14211 14212 |
# File 'lib/pago/v2026_04/models.rb', line 14210 def created_at @created_at end |
#id ⇒ String (readonly)
The ID of the object.
14218 14219 14220 |
# File 'lib/pago/v2026_04/models.rb', line 14218 def id @id end |
#metadata ⇒ Hash{String => String, Integer, Float, Boolean} (readonly)
14221 14222 14223 |
# File 'lib/pago/v2026_04/models.rb', line 14221 def @metadata end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
14214 14215 14216 |
# File 'lib/pago/v2026_04/models.rb', line 14214 def modified_at @modified_at end |
#name ⇒ String (readonly)
Name of the custom field.
14232 14233 14234 |
# File 'lib/pago/v2026_04/models.rb', line 14232 def name @name end |
#organization_id ⇒ String (readonly)
The ID of the organization owning the custom field.
14236 14237 14238 |
# File 'lib/pago/v2026_04/models.rb', line 14236 def organization_id @organization_id end |
#properties ⇒ Models::CustomFieldTextProperties (readonly)
14239 14240 14241 |
# File 'lib/pago/v2026_04/models.rb', line 14239 def properties @properties end |
#slug ⇒ String (readonly)
Identifier of the custom field. It'll be used as key when storing the value.
14228 14229 14230 |
# File 'lib/pago/v2026_04/models.rb', line 14228 def slug @slug end |
#type ⇒ String (readonly)
14224 14225 14226 |
# File 'lib/pago/v2026_04/models.rb', line 14224 def type @type end |
Class Method Details
.from_json(data) ⇒ CustomFieldText?
14266 14267 14268 14269 14270 14271 14272 14273 14274 14275 14276 14277 14278 14279 14280 14281 14282 14283 14284 14285 |
# File 'lib/pago/v2026_04/models.rb', line 14266 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( created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET), modified_at: (data.key?("modified_at") ? data["modified_at"] : ::Pago::UNSET), id: (data.key?("id") ? data["id"] : ::Pago::UNSET), metadata: (data.key?("metadata") ? data["metadata"] : ::Pago::UNSET), type: (data.key?("type") ? data["type"] : ::Pago::UNSET), slug: (data.key?("slug") ? data["slug"] : ::Pago::UNSET), name: (data.key?("name") ? data["name"] : ::Pago::UNSET), organization_id: (data.key?("organization_id") ? data["organization_id"] : ::Pago::UNSET), properties: (data.key?("properties") ? Models::CustomFieldTextProperties.from_json(data["properties"]) : ::Pago::UNSET) ), data ) end |