Sha256: f8ea6c8209298f9571d119b1b8c73940448675348494624dc9d28ac289362b42

Contents?: true

Size: 869 Bytes

Versions: 1

Compression:

Stored size: 869 Bytes

Contents

module MangoPay
  class PayOut < Resource
    include HTTPCalls::Fetch

    # Fetches list of refunds belonging to the given +pay_out_id+.
    #
    # Optional +filters+ is a hash accepting following keys:
    # - +page+, +per_page+, +sort+: pagination and sorting params (see MangoPay::HTTPCalls::Fetch::ClassMethods#fetch)
    # - +Status+: TransactionStatus {CREATED, SUCCEEDED, FAILED}
    # - +ResultCode+: string representing the transaction result
    def self.refunds(pay_out_id, filters = {}, idempotency_key = nil)
      url = url(pay_out_id) + '/refunds'
      MangoPay.request(:get, url, {}, filters, idempotency_key)
    end

    # See http://docs.mangopay.com/api-references/pay-out-bank-wire/
    class BankWire < Resource
      include HTTPCalls::Create

      def self.url(*)
        "#{MangoPay.api_path}/payouts/bankwire"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mangopay-3.3.0 lib/mangopay/pay_out.rb