Class: MangoPay::User
- 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
-
MangoPay::NaturalUserSca
-
MangoPay::LegalUserSca
Direct Known Subclasses
Class Method Summary collapse
-
.bank_accounts(user_id, filters = {}) ⇒ Object
Fetches list of bank accounts belonging to the given
user_id. -
.block_status(user_id, filters = {}) ⇒ Object
Fetches User Block Status.
-
.cards(user_id, filters = {}) ⇒ Object
Fetches list of cards belonging to the given
user_id. -
.emoney(user_id, year, month = nil, filters = {}) ⇒ Object
View EMoney belonging to the given
user_id. - .enroll_sca(user_id, idempotency_key = nil) ⇒ Object
- .fetch_sca(user_id) ⇒ Object
-
.kyc_documents(user_id, filters = {}) ⇒ Object
Fetches list of kyc documents belonging to the given
user_id. - .manage_consent(user_id, idempotency_key = nil) ⇒ Object
-
.pre_authorizations(user_id, filters = {}) ⇒ Object
Fetches list of pre-authorizations belonging to the given
user_id. -
.regulatory(user_id, filters = {}) ⇒ Object
Fetches User Regulatory.
-
.transactions(user_id, filters = {}) ⇒ Object
Fetches list of transactions belonging to the given
user_id. - .validate_data_format(params, idempotency_key = nil) ⇒ Object
-
.wallets(user_id, filters = {}) ⇒ Object
Fetches list of wallets belonging to the given
user_id.
Methods included from HTTPCalls::Fetch
Methods included from HTTPCalls::Update
Methods included from HTTPCalls::Create
Methods inherited from Resource
Class Method Details
.bank_accounts(user_id, filters = {}) ⇒ Object
Fetches list of bank accounts 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)
35 36 37 |
# File 'lib/mangopay/user.rb', line 35 def bank_accounts(user_id, filters = {}) MangoPay.request(:get, url(user_id) + '/bankaccounts', {}, filters) end |
.block_status(user_id, filters = {}) ⇒ Object
Fetches User Block Status
81 82 83 |
# File 'lib/mangopay/user.rb', line 81 def block_status(user_id, filters = {}) MangoPay.request(:get, url(user_id) + '/blockStatus', {}, filters) end |
.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)
42 43 44 |
# File 'lib/mangopay/user.rb', line 42 def cards(user_id, filters = {}) MangoPay.request(:get, url(user_id) + '/cards', {}, filters) end |
.emoney(user_id, year, month = nil, filters = {}) ⇒ Object
View EMoney 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)
58 59 60 61 62 63 64 |
# File 'lib/mangopay/user.rb', line 58 def emoney(user_id, year, month = nil, filters = {}) if month MangoPay.request(:get, url(user_id) + "/emoney/#{year}/#{month}", {}, filters) else MangoPay.request(:get, url(user_id) + "/emoney/#{year}", {}, filters) end end |
.enroll_sca(user_id, idempotency_key = nil) ⇒ Object
14 15 16 17 |
# File 'lib/mangopay/user.rb', line 14 def enroll_sca(user_id, idempotency_key = nil) url = "#{MangoPay.api_path}/sca/users/#{user_id}/enrollment" MangoPay.request(:post, url, {}, {}, idempotency_key) end |
.fetch_sca(user_id) ⇒ Object
90 91 92 93 |
# File 'lib/mangopay/user.rb', line 90 def fetch_sca(user_id) url = "#{MangoPay.api_path}/sca/users/#{user_id}" MangoPay.request(:get, url, {}, {}) end |
.kyc_documents(user_id, filters = {}) ⇒ Object
Fetches list of kyc documents belonging to the given user_id. Optional filters is a hash accepting following keys:
-
page,per_page,sort,BeforeDate,AfterDate,Status: pagination and sorting params (see MangoPay::HTTPCalls::Fetch::ClassMethods#fetch)
69 70 71 |
# File 'lib/mangopay/user.rb', line 69 def kyc_documents(user_id, filters = {}) MangoPay.request(:get, url(user_id) + '/KYC/documents', {}, filters) end |
.manage_consent(user_id, idempotency_key = nil) ⇒ Object
19 20 21 22 |
# File 'lib/mangopay/user.rb', line 19 def (user_id, idempotency_key = nil) url = "#{MangoPay.api_path}/sca/users/#{user_id}/consent" MangoPay.request(:post, url, {}, {}, idempotency_key) end |
.pre_authorizations(user_id, filters = {}) ⇒ Object
Fetches list of pre-authorizations belonging to the given user_id. Optional filters is a hash accepting the following keys:
-
page,per_page,sort,Status,ResultCode,PaymentStatus: pagination and sorting/filtering params (see MangoPay::HTTPCalls::Fetch::ClassMethods#fetch)
76 77 78 |
# File 'lib/mangopay/user.rb', line 76 def (user_id, filters = {}) MangoPay.request(:get, url(user_id) + '/preauthorizations', {}, filters) end |
.regulatory(user_id, filters = {}) ⇒ Object
Fetches User Regulatory
86 87 88 |
# File 'lib/mangopay/user.rb', line 86 def regulatory(user_id, filters = {}) MangoPay.request(:get, url(user_id) + '/Regulatory', {}, 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)
50 51 52 |
# File 'lib/mangopay/user.rb', line 50 def transactions(user_id, filters = {}) MangoPay.request(:get, url(user_id) + '/transactions', {}, filters) end |
.validate_data_format(params, idempotency_key = nil) ⇒ Object
95 96 97 |
# File 'lib/mangopay/user.rb', line 95 def validate_data_format(params, idempotency_key = nil) MangoPay.request(:post, "#{MangoPay.api_path}/users/data-formats/validation", params, {}, idempotency_key) 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)
27 28 29 |
# File 'lib/mangopay/user.rb', line 27 def wallets(user_id, filters = {}) MangoPay.request(:get, url(user_id) + '/wallets', {}, filters) end |