Sha256: e1d9d9ecee4755a47b2b3237356440f20719b79d2186d05049b1c3d2ad32adf3

Contents?: true

Size: 361 Bytes

Versions: 11

Compression:

Stored size: 361 Bytes

Contents

module Notifications
  class Client
    class ResponsePrecompiledLetter
      FIELDS = %i(
      id
      reference
      postage
    ).freeze

      attr_reader(*FIELDS)

      def initialize(notification)
        FIELDS.each do |field|
          instance_variable_set(:"@#{field}", notification.fetch(field.to_s, nil))
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
notifications-ruby-client-6.2.0 lib/notifications/client/response_precompiled_letter.rb
notifications-ruby-client-6.0.0 lib/notifications/client/response_precompiled_letter.rb
notifications-ruby-client-5.4.0 lib/notifications/client/response_precompiled_letter.rb
notifications-ruby-client-5.3.0 lib/notifications/client/response_precompiled_letter.rb
notifications-ruby-client-5.2.0 lib/notifications/client/response_precompiled_letter.rb
notifications-ruby-client-5.1.2 lib/notifications/client/response_precompiled_letter.rb
notifications-ruby-client-5.1.1 lib/notifications/client/response_precompiled_letter.rb
notifications-ruby-client-5.1.0 lib/notifications/client/response_precompiled_letter.rb
notifications-ruby-client-4.0.0 lib/notifications/client/response_precompiled_letter.rb
notifications-ruby-client-3.1.0 lib/notifications/client/response_precompiled_letter.rb
notifications-ruby-client-3.0.0 lib/notifications/client/response_precompiled_letter.rb