Class: Pago::V2026_04::Models::EventsIngestResponse

Inherits:
Model
  • Object
show all
Defined in:
lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs

Constant Summary collapse

JSON_KEYS =

Returns:

  • (Hash[Symbol, String])
{
  inserted: "inserted",
  duplicates: "duplicates"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["inserted"].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw

Constructor Details

#initialize(inserted:, duplicates: ::Pago::UNSET) ⇒ EventsIngestResponse

Returns a new instance of EventsIngestResponse.

Parameters:

  • inserted: (Integer)
  • duplicates: (Integer, nil) (defaults to: ::Pago::UNSET)


25352
25353
25354
25355
25356
25357
25358
25359
# File 'lib/pago/v2026_04/models.rb', line 25352

def initialize(
  inserted:,
  duplicates: ::Pago::UNSET
)
  super()
  assign(:inserted, inserted)
  assign(:duplicates, duplicates)
end

Instance Attribute Details

#duplicatesInteger (readonly)

Number of duplicate events skipped.

Returns:

  • (Integer)


25350
25351
25352
# File 'lib/pago/v2026_04/models.rb', line 25350

def duplicates
  @duplicates
end

#insertedInteger (readonly)

Number of events inserted.

Returns:

  • (Integer)


25346
25347
25348
# File 'lib/pago/v2026_04/models.rb', line 25346

def inserted
  @inserted
end

Class Method Details

.from_json(data) ⇒ EventsIngestResponse?

Parameters:

  • data (Hash, String, nil)

Returns:



25363
25364
25365
25366
25367
25368
25369
25370
25371
25372
25373
25374
25375
# File 'lib/pago/v2026_04/models.rb', line 25363

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(
      inserted: (data.key?("inserted") ? data["inserted"] : ::Pago::UNSET),
      duplicates: (data.key?("duplicates") ? data["duplicates"] : ::Pago::UNSET)
    ),
    data
  )
end