Sha256: efa88dc29de8c0dedad304a78f1a6f518100725d6b7f25c02b2c7ad26ab87532

Contents?: true

Size: 829 Bytes

Versions: 10

Compression:

Stored size: 829 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 = {})
      url = url(pay_out_id) + '/refunds'
      MangoPay.request(:get, url, {}, filters)
    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

10 entries across 10 versions & 1 rubygems

Version Path
mangopay-3.2.0 lib/mangopay/pay_out.rb
mangopay-3.1.0 lib/mangopay/pay_out.rb
mangopay-3.0.38 lib/mangopay/pay_out.rb
mangopay-3.0.37 lib/mangopay/pay_out.rb
mangopay-3.0.36 lib/mangopay/pay_out.rb
mangopay-3.0.35 lib/mangopay/pay_out.rb
mangopay-3.0.34 lib/mangopay/pay_out.rb
mangopay-3.0.33 lib/mangopay/pay_out.rb
mangopay-3.0.32 lib/mangopay/pay_out.rb
mangopay-3.0.31 lib/mangopay/pay_out.rb