Sha256: 0b64b881158ff132dca9137bfbdbd1981f89eb0a22325d812982ba97eed5e21a

Contents?: true

Size: 498 Bytes

Versions: 4

Compression:

Stored size: 498 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)
        multi_payment_api.create
      end

    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
moip2-0.1.4 lib/moip2/resource/multi_order.rb
moip2-0.1.3 lib/moip2/resource/multi_order.rb
moip2-0.1.1 lib/moip2/resource/multi_order.rb
moip2-0.1.0 lib/moip2/resource/multi_order.rb