Sha256: 90a9d0248eab30d8a6b7c9df2e5658ae37e55c150cf6007ebeead91a1b356cef

Contents?: true

Size: 685 Bytes

Versions: 10

Compression:

Stored size: 685 Bytes

Contents

# typed: true
# frozen_string_literal: true

module EML
  module UK
    module Models
      module TNS
        class Message < ::EML::Model
          extend T::Sig

          fields("Transactions" => :transactions)

          sig { params(raw_values: T::Hash[String, T.untyped]).void }
          def initialize(raw_values)
            raw_transactions = raw_values.fetch("Transactions", [])
            @transactions = raw_transactions.
              each_with_object([]) do |raw_transaction, transactions|
                transactions << EML::UK::Models::TNS::Transaction.
                  new(raw_transaction)
              end
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
eml-3.0.0 lib/eml/uk/models/tns/message.rb
eml-2.2.0 lib/eml/uk/models/tns/message.rb
eml-2.1.8 lib/eml/uk/models/tns/message.rb
eml-2.1.7 lib/eml/uk/models/tns/message.rb
eml-2.1.6 lib/eml/uk/models/tns/message.rb
eml-2.1.5 lib/eml/uk/models/tns/message.rb
eml-2.1.4 lib/eml/uk/models/tns/message.rb
eml-2.1.3 lib/eml/uk/models/tns/message.rb
eml-2.1.2 lib/eml/uk/models/tns/message.rb
eml-2.1.1 lib/eml/uk/models/tns/message.rb