Sha256: fb7ccf4130c7b051950837614c892c33e026e2959f329a63855e6c0b2e173bcf

Contents?: true

Size: 977 Bytes

Versions: 7

Compression:

Stored size: 977 Bytes

Contents

module MoneyS3
  module Parsers
    class StavZasobyType
      include ParserCore::BaseParser

      def zasoba
        at 'Zasoba'
      end

      def zasoba_attributes
        attributes_at 'Zasoba'
      end

      def rezervace
        at 'Rezervace'
      end

      def rezervace_attributes
        attributes_at 'Rezervace'
      end

      def objednano
        at 'Objednano'
      end

      def objednano_attributes
        attributes_at 'Objednano'
      end

      def to_h
        hash = {}
        hash[:attributes] = attributes

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

        hash
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
money_s3-2.4.1 lib/money_s3/parsers/stav_zasoby_type.rb
money_s3-2.4.0 lib/money_s3/parsers/stav_zasoby_type.rb
money_s3-2.3.0 lib/money_s3/parsers/stav_zasoby_type.rb
money_s3-2.2.0 lib/money_s3/parsers/stav_zasoby_type.rb
money_s3-2.1.0 lib/money_s3/parsers/stav_zasoby_type.rb
money_s3-2.0.0 lib/money_s3/parsers/stav_zasoby_type.rb
money_s3-1.0.0 lib/money_s3/parsers/stav_zasoby_type.rb