Sha256: 1e7b683866967544447cd3a49d399d6293a2b3f5d66a89f0e8666bc3d8b5a2df

Contents?: true

Size: 771 Bytes

Versions: 7

Compression:

Stored size: 771 Bytes

Contents

module MoneyS3
  module Parsers
    class VazbaType
      include ParserCore::BaseParser

      def typ
        at 'Typ'
      end

      def typ_attributes
        attributes_at 'Typ'
      end

      def pod_typ
        at 'PodTyp'
      end

      def pod_typ_attributes
        attributes_at 'PodTyp'
      end

      def doklad
        submodel_at(Doklad, 'Doklad')
      end

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

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

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