Sha256: 9018e267fa8821359367b6d331d5c4bb8d1db0014705d4b502a3ca8405babd6c

Contents?: true

Size: 729 Bytes

Versions: 1

Compression:

Stored size: 729 Bytes

Contents

require 'money_s3/parsers/base_parser'

module MoneyS3
  module Parsers
    class DalsiSazba
      include BaseParser

      def popis
        at 'Popis'
      end

      def hladina_dph
        at 'HladinaDPH'
      end

      def sazba
        at 'Sazba'
      end

      def zaklad
        at 'Zaklad'
      end

      def dph
        at 'DPH'
      end

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

        hash[:popis] = popis if has? 'Popis'
        hash[:hladina_dph] = hladina_dph if has? 'HladinaDPH'
        hash[:sazba] = sazba if has? 'Sazba'
        hash[:zaklad] = zaklad if has? 'Zaklad'
        hash[:dph] = dph if has? 'DPH'

        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/dalsi_sazba.rb