Sha256: 13018fc7f12aa1b4237593bda6da843cb70b1d864aa91ed7f286bdcc49dfd5b4

Contents?: true

Size: 629 Bytes

Versions: 5

Compression:

Stored size: 629 Bytes

Contents

require 'money_s3/builders/base_builder'
require 'money_s3/builders/firma_type'
require 'money_s3/builders/message_type'

module MoneyS3
  module Builders
    class MsgFirmaType
      include BaseBuilder

      def builder
        root = Ox::Element.new(name)
        if data.respond_to? :attributes
          data.attributes.each { |k, v| root[k] = v }
        end

        if data.key? :data
          root << FirmaType.new('Data', data[:data]).builder
        end

        if data.key? :osoba
          data[:osoba].each { |i| root << MessageType.new('Osoba', i).builder }
        end

        root
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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