Sha256: e2a91971a5b569bc7c36e34a9a6be35556be86d59b48a4a61018c954d2b21ce3

Contents?: true

Size: 864 Bytes

Versions: 7

Compression:

Stored size: 864 Bytes

Contents

module MoneyS3
  module Parsers
    class NepPlatbaType
      include ParserCore::BaseParser

      def platidlo
        submodel_at(NepPlatidloType, 'Platidlo')
      end

      def mnozstvi_mj
        at 'MnozstviMJ'
      end

      def mnozstvi_mj_attributes
        attributes_at 'MnozstviMJ'
      end

      def castka
        at 'Castka'
      end

      def castka_attributes
        attributes_at 'Castka'
      end

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

        hash[:platidlo] = platidlo.to_h if has? 'Platidlo'
        hash[:mnozstvi_mj] = mnozstvi_mj if has? 'MnozstviMJ'
        hash[:mnozstvi_mj_attributes] = mnozstvi_mj_attributes if has? 'MnozstviMJ'
        hash[:castka] = castka if has? 'Castka'
        hash[:castka_attributes] = castka_attributes if has? 'Castka'

        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/nep_platba_type.rb
money_s3-2.4.0 lib/money_s3/parsers/nep_platba_type.rb
money_s3-2.3.0 lib/money_s3/parsers/nep_platba_type.rb
money_s3-2.2.0 lib/money_s3/parsers/nep_platba_type.rb
money_s3-2.1.0 lib/money_s3/parsers/nep_platba_type.rb
money_s3-2.0.0 lib/money_s3/parsers/nep_platba_type.rb
money_s3-1.0.0 lib/money_s3/parsers/nep_platba_type.rb