Sha256: 59aaaf4ef849d516df451f97e8be240c58af6b31726e38cd2751c372ff0726a0

Contents?: true

Size: 478 Bytes

Versions: 3

Compression:

Stored size: 478 Bytes

Contents

module Moip2
  class MultiPaymentApi
    attr_reader :client

    def initialize(client)
      @client = client
    end

    def base_path(multi_order_id)
      "/v2/multiorders/#{multi_order_id}/multipayments"
    end

    def create(multi_order_id, payment)
      Resource::Payment.new client.post(base_path(multi_order_id), payment)
    end

    def show(multi_payment_id)
      Resource::MultiPayment.new client.get("/v2/multipayments/#{multi_payment_id}")
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
moip2-0.1.4 lib/moip2/multi_payment_api.rb
moip2-0.1.3 lib/moip2/multi_payment_api.rb
moip2-0.1.1 lib/moip2/multi_payment_api.rb