Sha256: 4aaf7c45e2cef29565b48b69a0377983344b4fee622e1d4a28688adec16e9bea

Contents?: true

Size: 1.02 KB

Versions: 4

Compression:

Stored size: 1.02 KB

Contents

require 'money_s3/parsers/base_parser'
require 'money_s3/parsers/obdobi_dph'

module MoneyS3
  module Parsers
    class ZauctovaniDPHDetype
      include BaseParser

      def zkrat
        at 'Zkrat'
      end

      def typ
        at 'Typ'
      end

      def popis
        at 'Popis'
      end

      def poh_dss
        at 'PohDSS'
      end

      def poh_dzs
        at 'PohDZS'
      end

      def pozn
        at 'Pozn'
      end

      def seznam_obdobi_dph
        array_of_at(ObdobiDPH, ['SeznamObdobiDPH', 'ObdobiDPH'])
      end

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

        hash[:zkrat] = zkrat if has? 'Zkrat'
        hash[:typ] = typ if has? 'Typ'
        hash[:popis] = popis if has? 'Popis'
        hash[:poh_dss] = poh_dss if has? 'PohDSS'
        hash[:poh_dzs] = poh_dzs if has? 'PohDZS'
        hash[:pozn] = pozn if has? 'Pozn'
        hash[:seznam_obdobi_dph] = seznam_obdobi_dph.map(&:to_h_with_attrs) if has? 'SeznamObdobiDPH'

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