Sha256: cd040706f81bc42db593a4aaf6ca70742ccaba3600bb3c35012cd655498fddd6

Contents?: true

Size: 795 Bytes

Versions: 4

Compression:

Stored size: 795 Bytes

Contents

require 'money_s3/parsers/base_parser'
require 'money_s3/parsers/valuty'

module MoneyS3
  module Parsers
    class SouhrnDPHPolType
      include BaseParser

      def zaklad_mj
        at 'Zaklad_MJ'
      end

      def dph_mj
        at 'DPH_MJ'
      end

      def zaklad
        at 'Zaklad'
      end

      def dph
        at 'DPH'
      end

      def valuty
        submodel_at(Valuty, 'Valuty')
      end

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

        hash[:zaklad_mj] = zaklad_mj if has? 'Zaklad_MJ'
        hash[:dph_mj] = dph_mj if has? 'DPH_MJ'
        hash[:zaklad] = zaklad if has? 'Zaklad'
        hash[:dph] = dph if has? 'DPH'
        hash[:valuty] = valuty.to_h_with_attrs if has? 'Valuty'

        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/souhrn_dph_pol_type.rb
money_s3-0.9.0 lib/money_s3/parsers/souhrn_dph_pol_type.rb
money_s3-0.8.0 lib/money_s3/parsers/souhrn_dph_pol_type.rb
money_s3-0.7.0 lib/money_s3/parsers/souhrn_dph_pol_type.rb