Sha256: c2540b3acd921b203ecbaecee16b7d11f1ecbc3dc97eb1835657766ad69c5741

Contents?: true

Size: 573 Bytes

Versions: 1

Compression:

Stored size: 573 Bytes

Contents

require 'money_s3/parsers/base_parser'

module MoneyS3
  module Parsers
    class StavZasobyType
      include BaseParser

      def zasoba
        at 'Zasoba'
      end

      def rezervace
        at 'Rezervace'
      end

      def objednano
        at 'Objednano'
      end

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

        hash[:zasoba] = zasoba if has? 'Zasoba'
        hash[:rezervace] = rezervace if has? 'Rezervace'
        hash[:objednano] = objednano if has? 'Objednano'

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