Sha256: 6e9ce58e07f7ac99e36fd28e34c78c0901d022fa8949b9e30dc9cc93e85e90f2

Contents?: true

Size: 1012 Bytes

Versions: 1

Compression:

Stored size: 1012 Bytes

Contents

require 'money_s3/parsers/base_parser'
require 'money_s3/parsers/ekategorie_zasoba_type'

module MoneyS3
  module Parsers
    class EshopZasobaType
      include 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
        hash = WithAttributes.new({})
        hash.attributes = 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) if has? 'eSkup'

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