Sha256: 9100b73ccac21a4692f4a97830cfd30b272521fdc8bad2bf637c8f584d2ee4fb

Contents?: true

Size: 811 Bytes

Versions: 1

Compression:

Stored size: 811 Bytes

Contents

require 'money_s3/parsers/base_parser'
require 'money_s3/parsers/dokl_ref_type'

module MoneyS3
  module Parsers
    class KurzRozd
      include BaseParser

      def typ
        at 'Typ'
      end

      def preceneni
        at 'Preceneni'
      end

      def castka
        at 'Castka'
      end

      def kr_poradi
        at 'KRPoradi'
      end

      def doklad
        submodel_at(DoklRefType, 'Doklad')
      end

      def to_h
        hash = WithAttributes.new({})
        hash.attributes = attributes

        hash[:typ] = typ if has? 'Typ'
        hash[:preceneni] = preceneni if has? 'Preceneni'
        hash[:castka] = castka if has? 'Castka'
        hash[:kr_poradi] = kr_poradi if has? 'KRPoradi'
        hash[:doklad] = doklad.to_h if has? 'Doklad'

        hash
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
money_s3-0.6.0 lib/money_s3/parsers/kurz_rozd.rb