class MangoPay::Client

Public Class Methods

create_bank_account(params) click to toggle source
# File lib/mangopay/client.rb, line 80
def create_bank_account(params)
  MangoPay.request(:post, url() + "/bankaccounts/iban", params)
end
create_payout(params) { |method, path, params| ... } click to toggle source
# File lib/mangopay/client.rb, line 84
def create_payout(params)
  method = :post
  path = url() + "/payouts"
  yield method, path, params if block_given?
  MangoPay.request(method, path, params)
end
fetch() click to toggle source

see docs.mangopay.com/api-references/client-details/

# File lib/mangopay/client.rb, line 9
def fetch()
  MangoPay.request(:get, url())
end
fetch_wallet(funds_type, currency_iso_code) { |method, path| ... } click to toggle source

Fetch one of your client wallets (fees or credit) with a particular currency; funds_type may be:

- nil: all wallets
- 'fees': fees wallets
- 'credit': credit wallets

currency_iso_code is currncy ISO code see docs.mangopay.com/api-references/client-wallets/

# File lib/mangopay/client.rb, line 49
def fetch_wallet(funds_type, currency_iso_code)
  method = :get
  path = url() + "/wallets/#{funds_type}/#{currency_iso_code}"
  yield method, path if block_given?
  MangoPay.request(method, path)
end
fetch_wallet_transactions(funds_type, currency_iso_code, filters = {}) click to toggle source

Fetch transactions for one of your client wallets (fees or credit) with a particular currency; funds_type may be:

- nil: all wallets
- 'fees': fees wallets
- 'credit': credit wallets

currency_iso_code is currncy ISO code Optional filters hash: see MangoPay::Transaction.fetch See docs.mangopay.com/api-references/client-wallets/

# File lib/mangopay/client.rb, line 71
def fetch_wallet_transactions(funds_type, currency_iso_code, filters = {})
  MangoPay.request(:get, url() + "/wallets/#{funds_type}/#{currency_iso_code}/transactions", {}, filters)
end
fetch_wallets(funds_type = nil) click to toggle source

Fetch all your client wallets; funds_type may be:

- nil: all wallets
- 'fees': fees wallets
- 'credit': credit wallets

see docs.mangopay.com/api-references/client-wallets/

# File lib/mangopay/client.rb, line 38
def fetch_wallets(funds_type = nil)
  MangoPay.request(:get, url() + "/wallets/#{funds_type}")
end
fetch_wallets_transactions(filters = {}) click to toggle source

Fetch transactions for all your client wallets. Optional filters hash: see MangoPay::Transaction.fetch See docs.mangopay.com/api-references/client-wallets/

# File lib/mangopay/client.rb, line 59
def fetch_wallets_transactions(filters = {})
  MangoPay.request(:get, url() + "/transactions", {}, filters)
end
update(params) click to toggle source

see docs.mangopay.com/api-references/client-details/

# File lib/mangopay/client.rb, line 14
def update(params)
  MangoPay.request(:put, url(), params)
end
validate(client_id, card_id) click to toggle source
# File lib/mangopay/client.rb, line 75
def validate(client_id, card_id)
  url = "#{MangoPay.api_path}/cards/#{card_id}/validate"
  MangoPay.request(:post, url)
end