Sha256: 507c13015cf102df7b621b339107047a87453bb6699a6e4c6d764d21d60d0378

Contents?: true

Size: 947 Bytes

Versions: 2

Compression:

Stored size: 947 Bytes

Contents

module MoneyS3
  module Parsers
    class EshopZasobaType
      include ParserCore::BaseParser

      def in_export
        at 'IN_Export'
      end

      def in_changed
        at 'IN_Changed'
      end

      def in_deleted
        at 'IN_Deleted'
      end

      def cis_karty
        at 'CisKarty'
      end

      def cis_skladu
        at 'CisSkladu'
      end

      def e_skup
        array_of_at(EkategorieZasobaType, ['eSkup'])
      end

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

        hash[:in_export] = in_export if has? 'IN_Export'
        hash[:in_changed] = in_changed if has? 'IN_Changed'
        hash[:in_deleted] = in_deleted if has? 'IN_Deleted'
        hash[:cis_karty] = cis_karty if has? 'CisKarty'
        hash[:cis_skladu] = cis_skladu if has? 'CisSkladu'
        hash[:e_skup] = e_skup.map(&:to_h_with_attrs) if has? 'eSkup'

        hash
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
money_s3-0.12.0 lib/money_s3/parsers/eshop_zasoba_type.rb
money_s3-0.11.0 lib/money_s3/parsers/eshop_zasoba_type.rb