Class: Pago::V2026_04::Models::EventName
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ name: "name", label: "label", source: "source", occurrences: "occurrences", first_seen: "first_seen", last_seen: "last_seen" }.freeze
- REQUIRED_KEYS =
["name", "label", "source", "occurrences", "first_seen", "last_seen"].freeze
Instance Attribute Summary collapse
-
#first_seen ⇒ String
readonly
The first time the event occurred.
-
#label ⇒ String
readonly
Human readable label of the event.
-
#last_seen ⇒ String
readonly
The last time the event occurred.
-
#name ⇒ String
readonly
The name of the event.
-
#occurrences ⇒ Integer
readonly
Number of times the event has occurred.
- #source ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, label:, source:, occurrences:, first_seen:, last_seen:) ⇒ EventName
constructor
A new instance of EventName.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(name:, label:, source:, occurrences:, first_seen:, last_seen:) ⇒ EventName
Returns a new instance of EventName.
25032 25033 25034 25035 25036 25037 25038 25039 25040 25041 25042 25043 25044 25045 25046 25047 |
# File 'lib/pago/v2026_04/models.rb', line 25032 def initialize( name:, label:, source:, occurrences:, first_seen:, last_seen: ) super() assign(:name, name) assign(:label, label) assign(:source, source) assign(:occurrences, occurrences) assign(:first_seen, first_seen) assign(:last_seen, last_seen) end |
Instance Attribute Details
#first_seen ⇒ String (readonly)
The first time the event occurred.
25026 25027 25028 |
# File 'lib/pago/v2026_04/models.rb', line 25026 def first_seen @first_seen end |
#label ⇒ String (readonly)
Human readable label of the event.
25015 25016 25017 |
# File 'lib/pago/v2026_04/models.rb', line 25015 def label @label end |
#last_seen ⇒ String (readonly)
The last time the event occurred.
25030 25031 25032 |
# File 'lib/pago/v2026_04/models.rb', line 25030 def last_seen @last_seen end |
#name ⇒ String (readonly)
The name of the event.
25011 25012 25013 |
# File 'lib/pago/v2026_04/models.rb', line 25011 def name @name end |
#occurrences ⇒ Integer (readonly)
Number of times the event has occurred.
25022 25023 25024 |
# File 'lib/pago/v2026_04/models.rb', line 25022 def occurrences @occurrences end |
#source ⇒ String (readonly)
25018 25019 25020 |
# File 'lib/pago/v2026_04/models.rb', line 25018 def source @source end |
Class Method Details
.from_json(data) ⇒ EventName?
25051 25052 25053 25054 25055 25056 25057 25058 25059 25060 25061 25062 25063 25064 25065 25066 25067 |
# File 'lib/pago/v2026_04/models.rb', line 25051 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( name: (data.key?("name") ? data["name"] : ::Pago::UNSET), label: (data.key?("label") ? data["label"] : ::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 |