class Pohoda::Builders::Vch::VoucherDetailType

Public Instance Methods

builder() click to toggle source
# File lib/pohoda/builders/vch/voucher_detail_type.rb, line 7
def builder
  root = Ox::Element.new(name)
  root = add_attributes_and_namespaces(root)

  if data.key? :voucher_item
    data[:voucher_item].each { |i| root << Vch::VoucherItemType.new('vch:voucherItem', i).builder }
  end
  if data.key? :voucher_liquidation_item
    data[:voucher_liquidation_item].each { |i| root << Vch::VoucherliquidationItemType.new('vch:voucherLiquidationItem', i).builder }
  end

  root
end