Sha256: 813d715eec5b71683e3b67347e84303d63aeec4de976598f4e211c47cf129c04

Contents?: true

Size: 1.04 KB

Versions: 4

Compression:

Stored size: 1.04 KB

Contents

require 'money_s3/parsers/base_parser'

module MoneyS3
  module Parsers
    class Doklad
      include BaseParser

      def druh
        at 'Druh'
      end

      def cislo
        at 'Cislo'
      end

      def guid
        at 'GUID'
      end

      def prijat_dokl
        at 'PrijatDokl'
      end

      def var_symbol
        at 'VarSymbol'
      end

      def vystaveno
        at 'Vystaveno'
      end

      def dat_uc_pr
        at 'DatUcPr'
      end

      def plneno_dph
        at 'PlnenoDPH'
      end

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

        hash[:druh] = druh if has? 'Druh'
        hash[:cislo] = cislo if has? 'Cislo'
        hash[:guid] = guid if has? 'GUID'
        hash[:prijat_dokl] = prijat_dokl if has? 'PrijatDokl'
        hash[:var_symbol] = var_symbol if has? 'VarSymbol'
        hash[:vystaveno] = vystaveno if has? 'Vystaveno'
        hash[:dat_uc_pr] = dat_uc_pr if has? 'DatUcPr'
        hash[:plneno_dph] = plneno_dph if has? 'PlnenoDPH'

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