Sha256: 79261fed919d8070133cb96ac9dd6a8cb08b2aabc713e8d4720b276ee0adde32

Contents?: true

Size: 695 Bytes

Versions: 6

Compression:

Stored size: 695 Bytes

Contents

module MoneyS3
  module Builders
    class MessageRootType
      include ParserCore::BaseBuilder

      def builder
        root = Ox::Element.new(name)
        root = add_attributes_and_namespaces(root)

        root << build_element('Status', data[:status], data[:status_attributes]) if data.key? :status
        if data.key? :reference
          element = Ox::Element.new('Reference')
          data[:reference].map { |i| Ox::Element.new('ID') << i }.each { |i| element << i }
          root << element
        end
        if data.key? :error_info
          data[:error_info].each { |i| root << ErrorInfoType.new('ErrorInfo', i).builder }
        end

        root
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
money_s3-2.4.1 lib/money_s3/builders/message_root_type.rb
money_s3-2.4.0 lib/money_s3/builders/message_root_type.rb
money_s3-2.3.0 lib/money_s3/builders/message_root_type.rb
money_s3-2.2.0 lib/money_s3/builders/message_root_type.rb
money_s3-2.1.0 lib/money_s3/builders/message_root_type.rb
money_s3-2.0.0 lib/money_s3/builders/message_root_type.rb