Sha256: f4f59f12fe08fc06cdfb717c088f2f511e324f124a821f4f5bb34cfeca883a6b

Contents?: true

Size: 583 Bytes

Versions: 4

Compression:

Stored size: 583 Bytes

Contents

require 'money_s3/parsers/base_parser'
require 'money_s3/parsers/firma_type'
require 'money_s3/parsers/message_type'

module MoneyS3
  module Parsers
    class MsgFirmaType
      include BaseParser

      def data
        submodel_at(FirmaType, 'Data')
      end

      def osoba
        array_of_at(MessageType, ['Osoba'])
      end

      def to_h_with_attrs
        hash = HashWithAttributes.new({}, attributes)

        hash[:data] = data.to_h_with_attrs if has? 'Data'
        hash[:osoba] = osoba.map(&:to_h_with_attrs) if has? 'Osoba'

        hash
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
money_s3-0.10.0 lib/money_s3/parsers/msg_firma_type.rb
money_s3-0.9.0 lib/money_s3/parsers/msg_firma_type.rb
money_s3-0.8.0 lib/money_s3/parsers/msg_firma_type.rb
money_s3-0.7.0 lib/money_s3/parsers/msg_firma_type.rb