Sha256: 7056953912f44d6b23e47ec8c8c530e38ae1fd5e4f9516ca591372f62cd4d054

Contents?: true

Size: 584 Bytes

Versions: 4

Compression:

Stored size: 584 Bytes

Contents

require 'money_s3/parsers/base_parser'
require 'money_s3/parsers/doklad'

module MoneyS3
  module Parsers
    class VazbaType
      include BaseParser

      def typ
        at 'Typ'
      end

      def pod_typ
        at 'PodTyp'
      end

      def doklad
        submodel_at(Doklad, 'Doklad')
      end

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

        hash[:typ] = typ if has? 'Typ'
        hash[:pod_typ] = pod_typ if has? 'PodTyp'
        hash[:doklad] = doklad.to_h_with_attrs if has? 'Doklad'

        hash
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
money_s3-0.10.0 lib/money_s3/parsers/vazba_type.rb
money_s3-0.9.0 lib/money_s3/parsers/vazba_type.rb
money_s3-0.8.0 lib/money_s3/parsers/vazba_type.rb
money_s3-0.7.0 lib/money_s3/parsers/vazba_type.rb