Sha256: d18e1be4dda141573cdb9cffa25df948c0fda4829b1084ce9699a7a2a9d941c0

Contents?: true

Size: 430 Bytes

Versions: 20

Compression:

Stored size: 430 Bytes

Contents

module NulogyMessageBusProducer
  # A model that contains the event data for a particular subscription
  # It is simply saved in the database and shipped to Kafka by Debezium
  class SubscriptionEvent < ApplicationRecord
    self.table_name = :message_bus_subscription_events

    def self.create_or_update(attrs)
      find_or_initialize_by(id: attrs[:id]).tap do |model|
        model.update!(attrs)
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
nulogy_message_bus_producer-5.0.8 lib/nulogy_message_bus_producer/subscription_event.rb
nulogy_message_bus_producer-5.0.7 lib/nulogy_message_bus_producer/subscription_event.rb
nulogy_message_bus_producer-5.0.6 lib/nulogy_message_bus_producer/subscription_event.rb
nulogy_message_bus_producer-5.0.5 lib/nulogy_message_bus_producer/subscription_event.rb
nulogy_message_bus_producer-5.0.4 lib/nulogy_message_bus_producer/subscription_event.rb
nulogy_message_bus_producer-5.0.3 lib/nulogy_message_bus_producer/subscription_event.rb
nulogy_message_bus_producer-5.0.2 lib/nulogy_message_bus_producer/subscription_event.rb
nulogy_message_bus_producer-5.0.1 lib/nulogy_message_bus_producer/subscription_event.rb
nulogy_message_bus_producer-5.0.1.alpha lib/nulogy_message_bus_producer/subscription_event.rb
nulogy_message_bus_producer-5.0.0 lib/nulogy_message_bus_producer/subscription_event.rb
nulogy_message_bus_producer-4.0.0 lib/nulogy_message_bus_producer/subscription_event.rb
nulogy_message_bus_producer-3.7.0 lib/nulogy_message_bus_producer/subscription_event.rb
nulogy_message_bus_producer-3.6.0 lib/nulogy_message_bus_producer/subscription_event.rb
nulogy_message_bus_producer-3.5.0 lib/nulogy_message_bus_producer/subscription_event.rb
nulogy_message_bus_producer-3.4.1 lib/nulogy_message_bus_producer/subscription_event.rb
nulogy_message_bus_producer-3.4.0 lib/nulogy_message_bus_producer/subscription_event.rb
nulogy_message_bus_producer-3.3.0 lib/nulogy_message_bus_producer/subscription_event.rb
nulogy_message_bus_producer-3.2.1 lib/nulogy_message_bus_producer/subscription_event.rb
nulogy_message_bus_producer-3.2.0 lib/nulogy_message_bus_producer/subscription_event.rb
nulogy_message_bus_producer-3.1.1 lib/nulogy_message_bus_producer/subscription_event.rb