Sha256: 16c2cc427ba7be19ce73fb21fe9ad75d61b138d1049cd13b41746116bb386c33

Contents?: true

Size: 652 Bytes

Versions: 1

Compression:

Stored size: 652 Bytes

Contents

require 'money_s3/parsers/base_parser'
require 'money_s3/parsers/nep_platidlo_type'

module MoneyS3
  module Parsers
    class NepPlatbaType
      include BaseParser

      def mnozstvi_mj
        at 'MnozstviMJ'
      end

      def castka
        at 'Castka'
      end

      def platidlo
        submodel_at(NepPlatidloType, 'Platidlo')
      end

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

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

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