Class: Pago::V2026_04::Models::CustomFieldNumber
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Schema for a custom field of type number.
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::CustomFieldNumberProperties 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:) ⇒ CustomFieldNumber
constructor
A new instance of CustomFieldNumber.
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:) ⇒ CustomFieldNumber
Returns a new instance of CustomFieldNumber.
13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 |
# File 'lib/pago/v2026_04/models.rb', line 13899 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.
13868 13869 13870 |
# File 'lib/pago/v2026_04/models.rb', line 13868 def created_at @created_at end |
#id ⇒ String (readonly)
The ID of the object.
13876 13877 13878 |
# File 'lib/pago/v2026_04/models.rb', line 13876 def id @id end |
#metadata ⇒ Hash{String => String, Integer, Float, Boolean} (readonly)
13879 13880 13881 |
# File 'lib/pago/v2026_04/models.rb', line 13879 def @metadata end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
13872 13873 13874 |
# File 'lib/pago/v2026_04/models.rb', line 13872 def modified_at @modified_at end |
#name ⇒ String (readonly)
Name of the custom field.
13890 13891 13892 |
# File 'lib/pago/v2026_04/models.rb', line 13890 def name @name end |
#organization_id ⇒ String (readonly)
The ID of the organization owning the custom field.
13894 13895 13896 |
# File 'lib/pago/v2026_04/models.rb', line 13894 def organization_id @organization_id end |
#properties ⇒ Models::CustomFieldNumberProperties (readonly)
13897 13898 13899 |
# File 'lib/pago/v2026_04/models.rb', line 13897 def properties @properties end |
#slug ⇒ String (readonly)
Identifier of the custom field. It'll be used as key when storing the value.
13886 13887 13888 |
# File 'lib/pago/v2026_04/models.rb', line 13886 def slug @slug end |
#type ⇒ String (readonly)
13882 13883 13884 |
# File 'lib/pago/v2026_04/models.rb', line 13882 def type @type end |
Class Method Details
.from_json(data) ⇒ CustomFieldNumber?
13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 |
# File 'lib/pago/v2026_04/models.rb', line 13924 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::CustomFieldNumberProperties.from_json(data["properties"]) : ::Pago::UNSET) ), data ) end |