Sha256: 42f7635f11d7b799a4910e297fc3386ecc54144d63ba2a66023da6cb8af29690
Contents?: true
Size: 1.09 KB
Versions: 30
Compression:
Stored size: 1.09 KB
Contents
module MangoPay class Transaction < Resource class << self # 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 https://docs.mangopay.com/api-references/sort-lists/ def fetch(wallet_id, filters={}, headers = nil) MangoPay.request(:get, url(wallet_id), {}, filters, headers) end def url(wallet_id) "#{MangoPay.api_path}/wallets/#{CGI.escape(wallet_id.to_s)}/transactions" end end end end
Version data entries
30 entries across 30 versions & 1 rubygems