Sha256: 1aa2d64ba64a02e5e394e5b3fa24e620478e07fb6034bdaef05f3ae8d19c0750

Contents?: true

Size: 607 Bytes

Versions: 7

Compression:

Stored size: 607 Bytes

Contents

module MoneyS3
  module Parsers
    class SubPolObjType
      include ParserCore::BaseParser

      def mj_na_sadu
        at 'MJNaSadu'
      end

      def mj_na_sadu_attributes
        attributes_at 'MJNaSadu'
      end

      def polozka
        submodel_at(PolObjednType, 'Polozka')
      end

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

        hash[:mj_na_sadu] = mj_na_sadu if has? 'MJNaSadu'
        hash[:mj_na_sadu_attributes] = mj_na_sadu_attributes if has? 'MJNaSadu'
        hash[:polozka] = polozka.to_h if has? 'Polozka'

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