Class: Pago::V2026_04::Models::EventType
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ created_at: "created_at", modified_at: "modified_at", id: "id", name: "name", label: "label", label_property_selector: "label_property_selector", organization_id: "organization_id" }.freeze
- REQUIRED_KEYS =
["created_at", "modified_at", "id", "name", "label", "organization_id"].freeze
Instance Attribute Summary collapse
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
-
#id ⇒ String
readonly
The ID of the object.
-
#label ⇒ String
readonly
The label for the event type.
-
#label_property_selector ⇒ String?
readonly
Property path to extract dynamic label from event metadata.
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
-
#name ⇒ String
readonly
The name of the event type.
-
#organization_id ⇒ String
readonly
The ID of the organization owning the event type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(created_at:, modified_at:, id:, name:, label:, label_property_selector: ::Pago::UNSET, organization_id:) ⇒ EventType
constructor
A new instance of EventType.
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:, name:, label:, label_property_selector: ::Pago::UNSET, organization_id:) ⇒ EventType
Returns a new instance of EventType.
25110 25111 25112 25113 25114 25115 25116 25117 25118 25119 25120 25121 25122 25123 25124 25125 25126 25127 |
# File 'lib/pago/v2026_04/models.rb', line 25110 def initialize( created_at:, modified_at:, id:, name:, label:, label_property_selector: ::Pago::UNSET, organization_id: ) super() assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:id, id) assign(:name, name) assign(:label, label) assign(:label_property_selector, label_property_selector) assign(:organization_id, organization_id) end |
Instance Attribute Details
#created_at ⇒ String (readonly)
Creation timestamp of the object.
25084 25085 25086 |
# File 'lib/pago/v2026_04/models.rb', line 25084 def created_at @created_at end |
#id ⇒ String (readonly)
The ID of the object.
25092 25093 25094 |
# File 'lib/pago/v2026_04/models.rb', line 25092 def id @id end |
#label ⇒ String (readonly)
The label for the event type.
25100 25101 25102 |
# File 'lib/pago/v2026_04/models.rb', line 25100 def label @label end |
#label_property_selector ⇒ String? (readonly)
Property path to extract dynamic label from event metadata.
25104 25105 25106 |
# File 'lib/pago/v2026_04/models.rb', line 25104 def label_property_selector @label_property_selector end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
25088 25089 25090 |
# File 'lib/pago/v2026_04/models.rb', line 25088 def modified_at @modified_at end |
#name ⇒ String (readonly)
The name of the event type.
25096 25097 25098 |
# File 'lib/pago/v2026_04/models.rb', line 25096 def name @name end |
#organization_id ⇒ String (readonly)
The ID of the organization owning the event type.
25108 25109 25110 |
# File 'lib/pago/v2026_04/models.rb', line 25108 def organization_id @organization_id end |
Class Method Details
.from_json(data) ⇒ EventType?
25131 25132 25133 25134 25135 25136 25137 25138 25139 25140 25141 25142 25143 25144 25145 25146 25147 25148 |
# File 'lib/pago/v2026_04/models.rb', line 25131 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), name: (data.key?("name") ? data["name"] : ::Pago::UNSET), label: (data.key?("label") ? data["label"] : ::Pago::UNSET), label_property_selector: (data.key?("label_property_selector") ? data["label_property_selector"] : ::Pago::UNSET), organization_id: (data.key?("organization_id") ? data["organization_id"] : ::Pago::UNSET) ), data ) end |