class MangoPay::Transaction

Public Class Methods

fetch(wallet_id, filters={}, headers = nil) click to toggle source

Fetches list of transactions belonging to the given wallet_id. See also transactions for user: MangoPay::User#transactions

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}

  • Type: TransactionType {PAYIN, PAYOUT, TRANSFER}

  • Nature: TransactionNature {NORMAL, REFUND, REPUDIATION}

  • BeforeDate (timestamp): filters transactions with CreationDate before this date

  • AfterDate (timestamp): filters transactions with CreationDate after this date

See docs.mangopay.com/api-references/sort-lists/

# File lib/mangopay/transaction.rb, line 15
def fetch(wallet_id, filters={}, headers = nil)
  MangoPay.request(:get, url(wallet_id), {}, filters, headers)
end
url(wallet_id) click to toggle source
# File lib/mangopay/transaction.rb, line 19
def url(wallet_id)
  "#{MangoPay.api_path}/wallets/#{CGI.escape(wallet_id.to_s)}/transactions"
end