Sha256: bfb2b3195142a7cb0c203cb152fa819aebac46b856b6bd679e9c7caf55e4caca

Contents?: true

Size: 835 Bytes

Versions: 1

Compression:

Stored size: 835 Bytes

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
        { zkrat: zkrat,
          typ: typ,
          popis: popis,
          poh_dss: poh_dss,
          poh_dzs: poh_dzs,
          pozn: pozn,
          seznam_obdobi_dph: seznam_obdobi_dph.map(&:to_h)
        }.delete_if { |k, v| v.nil? || v.empty? }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
money_s3-0.4.0 lib/money_s3/parsers/zauctovani_dph_detype.rb