mangopay 3.0.30 → 3.0.30.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mangopay/user.rb +7 -0
- data/lib/mangopay/version.rb +1 -1
- data/spec/mangopay/user_spec.rb +17 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6346db992adff682f58586a8435d12bf7bb0ff9811927b4084c476264dc326d0
|
4
|
+
data.tar.gz: 9cb2ff496c327154aea0b02f5672efa697f2ee139730ec7710bbe481d068e353
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16c654da6df6533750d9d432139098596e281cd346634a75ff10106dbf90394e700b7d793fc3b48456a1766b616bd0e186a36390deafe4e4553ded25ebb28ae8
|
7
|
+
data.tar.gz: c0d2989975569aab32456edba096693bfc8f2f3aa2b376b44a37135686087d3390b083c0fa08a974078d653712f4917763854ffbea2d5cb61c1879510e1a5a30
|
data/lib/mangopay/user.rb
CHANGED
@@ -46,6 +46,13 @@ module MangoPay
|
|
46
46
|
def emoney(user_id, filters={})
|
47
47
|
MangoPay.request(:get, url(user_id) + '/emoney', {}, filters)
|
48
48
|
end
|
49
|
+
|
50
|
+
# Fetches list of kyc documents belonging to the given +user_id+.
|
51
|
+
# Optional +filters+ is a hash accepting following keys:
|
52
|
+
# - +page+, +per_page+, +sort+, +BeforeDate+, +AfterDate+, +Status+: pagination and sorting params (see MangoPay::HTTPCalls::Fetch::ClassMethods#fetch)
|
53
|
+
def kyc_documents(user_id, filters={})
|
54
|
+
MangoPay.request(:get, url(user_id) + '/KYC/documents', {}, filters)
|
55
|
+
end
|
49
56
|
end
|
50
57
|
end
|
51
58
|
end
|
data/lib/mangopay/version.rb
CHANGED
data/spec/mangopay/user_spec.rb
CHANGED
@@ -3,6 +3,7 @@ describe MangoPay::User do
|
|
3
3
|
include_context 'payins'
|
4
4
|
include_context 'payouts'
|
5
5
|
include_context 'wallets'
|
6
|
+
include_context 'kyc_documents'
|
6
7
|
|
7
8
|
describe 'CREATE' do
|
8
9
|
it 'creates a new natural user' do
|
@@ -156,6 +157,22 @@ describe MangoPay::User do
|
|
156
157
|
end
|
157
158
|
end
|
158
159
|
|
160
|
+
describe 'FETCH Kyc Document' do
|
161
|
+
it 'fetches empty list of kyc documents if no kyc document created' do
|
162
|
+
documents = MangoPay::User.kyc_documents(new_natural_user['Id'])
|
163
|
+
expect(documents).to be_kind_of(Array)
|
164
|
+
expect(documents).to be_empty
|
165
|
+
end
|
166
|
+
|
167
|
+
it 'fetches list with single kyc document after created' do
|
168
|
+
document = new_document
|
169
|
+
documents = MangoPay::User.kyc_documents(document['UserId'])
|
170
|
+
expect(documents).to be_kind_of(Array)
|
171
|
+
expect(documents.count).to eq 1
|
172
|
+
expect(documents.first['Id']).to eq document['Id']
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
159
176
|
describe 'CREATE UBO DECLARATION' do
|
160
177
|
it 'creates a UBO declaration' do
|
161
178
|
legal_user = new_legal_user
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mangopay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.30
|
4
|
+
version: 3.0.30.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geoffroy Lorieux
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-01-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|