Class: Pago::V2026_04::Models::EventTypeWithStats
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ id: "id", created_at: "created_at", modified_at: "modified_at", name: "name", label: "label", label_property_selector: "label_property_selector", organization_id: "organization_id", source: "source", occurrences: "occurrences", first_seen: "first_seen", last_seen: "last_seen" }.freeze
- REQUIRED_KEYS =
["name", "label", "organization_id", "source", "occurrences", "first_seen", "last_seen"].freeze
Instance Attribute Summary collapse
-
#created_at ⇒ String?
readonly
Creation timestamp of the event type.
-
#first_seen ⇒ String
readonly
The first time the event occurred.
-
#id ⇒ String?
readonly
The ID of the event type.
-
#label ⇒ String
readonly
The label for the event type.
-
#label_property_selector ⇒ String?
readonly
Property path to extract dynamic label from event metadata.
-
#last_seen ⇒ String
readonly
The last time the event occurred.
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the event type.
-
#name ⇒ String
readonly
The name of the event type.
-
#occurrences ⇒ Integer
readonly
Number of times the event has occurred.
-
#organization_id ⇒ String
readonly
The ID of the organization owning the event type.
- #source ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id: ::Pago::UNSET, created_at: ::Pago::UNSET, modified_at: ::Pago::UNSET, name:, label:, label_property_selector: ::Pago::UNSET, organization_id:, source:, occurrences:, first_seen:, last_seen:) ⇒ EventTypeWithStats
constructor
A new instance of EventTypeWithStats.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(id: ::Pago::UNSET, created_at: ::Pago::UNSET, modified_at: ::Pago::UNSET, name:, label:, label_property_selector: ::Pago::UNSET, organization_id:, source:, occurrences:, first_seen:, last_seen:) ⇒ EventTypeWithStats
Returns a new instance of EventTypeWithStats.
25251 25252 25253 25254 25255 25256 25257 25258 25259 25260 25261 25262 25263 25264 25265 25266 25267 25268 25269 25270 25271 25272 25273 25274 25275 25276 |
# File 'lib/pago/v2026_04/models.rb', line 25251 def initialize( id: ::Pago::UNSET, created_at: ::Pago::UNSET, modified_at: ::Pago::UNSET, name:, label:, label_property_selector: ::Pago::UNSET, organization_id:, source:, occurrences:, first_seen:, last_seen: ) super() assign(:id, id) assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:name, name) assign(:label, label) assign(:label_property_selector, label_property_selector) assign(:organization_id, organization_id) assign(:source, source) assign(:occurrences, occurrences) assign(:first_seen, first_seen) assign(:last_seen, last_seen) end |
Instance Attribute Details
#created_at ⇒ String? (readonly)
Creation timestamp of the event type. Null for system event types.
25214 25215 25216 |
# File 'lib/pago/v2026_04/models.rb', line 25214 def created_at @created_at end |
#first_seen ⇒ String (readonly)
The first time the event occurred.
25245 25246 25247 |
# File 'lib/pago/v2026_04/models.rb', line 25245 def first_seen @first_seen end |
#id ⇒ String? (readonly)
The ID of the event type. Null for system event types.
25210 25211 25212 |
# File 'lib/pago/v2026_04/models.rb', line 25210 def id @id end |
#label ⇒ String (readonly)
The label for the event type.
25226 25227 25228 |
# File 'lib/pago/v2026_04/models.rb', line 25226 def label @label end |
#label_property_selector ⇒ String? (readonly)
Property path to extract dynamic label from event metadata.
25230 25231 25232 |
# File 'lib/pago/v2026_04/models.rb', line 25230 def label_property_selector @label_property_selector end |
#last_seen ⇒ String (readonly)
The last time the event occurred.
25249 25250 25251 |
# File 'lib/pago/v2026_04/models.rb', line 25249 def last_seen @last_seen end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the event type. Null for system event types.
25218 25219 25220 |
# File 'lib/pago/v2026_04/models.rb', line 25218 def modified_at @modified_at end |
#name ⇒ String (readonly)
The name of the event type.
25222 25223 25224 |
# File 'lib/pago/v2026_04/models.rb', line 25222 def name @name end |
#occurrences ⇒ Integer (readonly)
Number of times the event has occurred.
25241 25242 25243 |
# File 'lib/pago/v2026_04/models.rb', line 25241 def occurrences @occurrences end |
#organization_id ⇒ String (readonly)
The ID of the organization owning the event type.
25234 25235 25236 |
# File 'lib/pago/v2026_04/models.rb', line 25234 def organization_id @organization_id end |
#source ⇒ String (readonly)
25237 25238 25239 |
# File 'lib/pago/v2026_04/models.rb', line 25237 def source @source end |
Class Method Details
.from_json(data) ⇒ EventTypeWithStats?
25280 25281 25282 25283 25284 25285 25286 25287 25288 25289 25290 25291 25292 25293 25294 25295 25296 25297 25298 25299 25300 25301 |
# File 'lib/pago/v2026_04/models.rb', line 25280 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( id: (data.key?("id") ? data["id"] : ::Pago::UNSET), created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET), modified_at: (data.key?("modified_at") ? data["modified_at"] : ::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), source: (data.key?("source") ? data["source"] : ::Pago::UNSET), occurrences: (data.key?("occurrences") ? data["occurrences"] : ::Pago::UNSET), first_seen: (data.key?("first_seen") ? data["first_seen"] : ::Pago::UNSET), last_seen: (data.key?("last_seen") ? data["last_seen"] : ::Pago::UNSET) ), data ) end |