Sha256: 61dcbb13ef99b33e6960d3d749f5691fb83158c233cadb64d3e7fc51c9b8a7c6

Contents?: true

Size: 479 Bytes

Versions: 1

Compression:

Stored size: 479 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

1 entries across 1 versions & 1 rubygems

Version Path
moip2-1.0.0 lib/moip2/multi_payment_api.rb