Class: MangoPay::User

Inherits:
Resource show all
Includes:
HTTPCalls::Create, HTTPCalls::Fetch, HTTPCalls::Update
Defined in:
lib/mangopay/user.rb

Overview

See docs.mangopay.com/api-references/users/ See also children classes:

  • MangoPay::NaturalUser

  • MangoPay::LegalUser

Direct Known Subclasses

LegalUser, NaturalUser

Class Method Summary collapse

Methods included from HTTPCalls::Fetch

included, parse_id_or_filters

Methods included from HTTPCalls::Update

included

Methods included from HTTPCalls::Create

included

Methods inherited from Resource

class_name, url

Class Method Details

.cards(user_id, filters = {}) ⇒ Object

Fetches list of cards belonging to the given user_id. Optional filters is a hash accepting following keys:

  • page, per_page, sort: pagination and sorting params (see MangoPay::HTTPCalls::Fetch::ClassMethods#fetch)


22
23
24
# File 'lib/mangopay/user.rb', line 22

def cards(user_id, filters={})
  MangoPay.request(:get, url(user_id) + '/cards', {}, filters)
end

.transactions(user_id, filters = {}) ⇒ Object

Fetches list of transactions belonging to the given user_id. Optional filters is a hash accepting following keys:

  • page, per_page, sort: pagination and sorting params (see MangoPay::HTTPCalls::Fetch::ClassMethods#fetch)

  • other keys specific for transactions filtering (see MangoPay::Transaction#fetch)


30
31
32
# File 'lib/mangopay/user.rb', line 30

def transactions(user_id, filters={})
  MangoPay.request(:get, url(user_id) + '/transactions', {}, filters)
end

.wallets(user_id, filters = {}) ⇒ Object

Fetches list of wallets belonging to the given user_id. Optional filters is a hash accepting following keys:

  • page, per_page, sort: pagination and sorting params (see MangoPay::HTTPCalls::Fetch::ClassMethods#fetch)


15
16
17
# File 'lib/mangopay/user.rb', line 15

def wallets(user_id, filters={})
  MangoPay.request(:get, url(user_id) + '/wallets', {}, filters)
end