Sha256: c43a806993a8c250ef63f95ab87f5b1b18fa1b67859a2bff74f1332faf73c606

Contents?: true

Size: 502 Bytes

Versions: 5

Compression:

Stored size: 502 Bytes

Contents

module Moip2
  module Resource
    class MultiOrder < SimpleDelegator
      attr_reader :client, :multi_payment_api, :external_id

      def initialize(client, response)
        super(response)
        @client = client

        if response.respond_to?(:external_id)
          @multi_payment_api = MultiPaymentApi.new(client)
          @external_id = response.external_id
        end
      end

      def create_multi_payment(_payment = nil)
        multi_payment_api.create
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
moip2-1.3.1 lib/moip2/resource/multi_order.rb
moip2-1.2.1 lib/moip2/resource/multi_order.rb
moip2-1.2.0 lib/moip2/resource/multi_order.rb
moip2-1.1.0 lib/moip2/resource/multi_order.rb
moip2-1.0.0 lib/moip2/resource/multi_order.rb