mangopay 3.33.0 → 3.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -0
- data/lib/mangopay/deposit.rb +8 -0
- data/lib/mangopay/identity_verification.rb +2 -2
- data/lib/mangopay/recipient.rb +2 -2
- data/lib/mangopay/version.rb +1 -1
- data/spec/mangopay/client_spec.rb +2 -2
- data/spec/mangopay/deposit_spec.rb +20 -0
- data/spec/mangopay/identity_verification_spec.rb +10 -15
- data/spec/mangopay/recipient_spec.rb +5 -2
- data/spec/mangopay/shared_resources.rb +1 -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: 9a183b9490a45fa73745d864f9643d9afec4e4ea56b002784e2b888ae7886b7b
|
4
|
+
data.tar.gz: 4079521fab8f807345c218e00510e5197d4cb05d8afc4cbd4a332e5231650100
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bb4ea160e1a0f9c93032320a1be553b669b7cc1f07c2b27d822ff7cc22e6015237666bc284f7304ad9d2302cfa9c963db75b81dfcae39645468efb717735c25
|
7
|
+
data.tar.gz: 2ee8715ac0e1bc4a96f8773f5bef406fa229a8f7d980b9813e539a4aaa4735451600f130046ae0810921e11e1ae0549d0850c1f1d7b98354228f9fe7c7f6c160
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,26 @@
|
|
1
|
+
## [3.34.0] - 2025-05-14
|
2
|
+
### Added and refined
|
3
|
+
|
4
|
+
#### Hosted KYC/KYB endpoints
|
5
|
+
|
6
|
+
The following endpoints have been refined following the beta phase, and are now generally available:
|
7
|
+
- [POST Create an IDV Session](https://docs.mangopay.com/api-reference/idv-sessions/create-idv-session) (no changes)
|
8
|
+
- [GET View an IDV Session](https://docs.mangopay.com/api-reference/idv-sessions/view-idv-session) (includes `Checks` in response)
|
9
|
+
- [GET List IDV Sessions for a User](https://docs.mangopay.com/api-reference/idv-sessions/list-idv-sessions-user) (new endpoint)
|
10
|
+
|
11
|
+
The previously available endpoint GET View Checks for an IDV Session has been removed (as Checks were integrated into the GET by ID).
|
12
|
+
|
13
|
+
See the [guide](https://docs.mangopay.com/guides/users/verification/hosted) for more details.
|
14
|
+
|
15
|
+
#### Recipients
|
16
|
+
|
17
|
+
The `Country` property has been added to [Recipients](https://docs.mangopay.com/guides/sca/recipients), as a required query parameter on [GET View the schema for a Recipient](https://docs.mangopay.com/api-reference/recipients/view-recipient-schema) and as a required body parameter on [POST Validate data for a Recipient](https://docs.mangopay.com/api-reference/recipients/validate-recipient-data) and [POST Create a Recipient](https://docs.mangopay.com/api-reference/recipients/create-recipient).
|
18
|
+
|
19
|
+
### Added
|
20
|
+
|
21
|
+
- [GET List Deposit Preauthorizations for a Card](https://docs.mangopay.com/api-reference/deposit-preauthorizations/list-deposit-preauthorizations-card)
|
22
|
+
- [GET List Deposit Preauthorizations for a User](https://docs.mangopay.com/api-reference/deposit-preauthorizations/list-deposit-preauthorizations-user)
|
23
|
+
|
1
24
|
## [3.33.0] - 2025-04-29
|
2
25
|
### Added
|
3
26
|
|
data/lib/mangopay/deposit.rb
CHANGED
@@ -16,5 +16,13 @@ module MangoPay
|
|
16
16
|
}
|
17
17
|
MangoPay.request(:put, "#{MangoPay.api_path}/deposit-preauthorizations/#{deposit_id}", params)
|
18
18
|
end
|
19
|
+
|
20
|
+
def self.get_all_for_user(user_id, filters = {})
|
21
|
+
MangoPay.request(:get, "#{MangoPay.api_path}/users/#{user_id}/deposit-preauthorizations", {}, filters)
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.get_all_for_card(card_id, filters = {})
|
25
|
+
MangoPay.request(:get, "#{MangoPay.api_path}/cards/#{card_id}/deposit-preauthorizations", {}, filters)
|
26
|
+
end
|
19
27
|
end
|
20
28
|
end
|
@@ -9,8 +9,8 @@ module MangoPay
|
|
9
9
|
MangoPay.request(:get, "#{MangoPay.api_path}/identity-verifications/#{identity_verification_id}", {}, filters)
|
10
10
|
end
|
11
11
|
|
12
|
-
def self.
|
13
|
-
MangoPay.request(:get, "#{MangoPay.api_path}/
|
12
|
+
def self.get_all(user_id, filters = {})
|
13
|
+
MangoPay.request(:get, "#{MangoPay.api_path}/users/#{user_id}/identity-verifications", {}, filters)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
data/lib/mangopay/recipient.rb
CHANGED
@@ -13,8 +13,8 @@ module MangoPay
|
|
13
13
|
MangoPay.request(:get, "#{MangoPay.api_path}/users/#{user_id}/recipients", {}, filters)
|
14
14
|
end
|
15
15
|
|
16
|
-
def self.get_schema(payout_method_type, recipient_type, currency, filters = {})
|
17
|
-
MangoPay.request(:get, "#{MangoPay.api_path}/recipients/schema?payoutMethodType=#{payout_method_type}&recipientType=#{recipient_type}¤cy=#{currency}", {}, filters)
|
16
|
+
def self.get_schema(payout_method_type, recipient_type, currency, country, filters = {})
|
17
|
+
MangoPay.request(:get, "#{MangoPay.api_path}/recipients/schema?payoutMethodType=#{payout_method_type}&recipientType=#{recipient_type}¤cy=#{currency}&country=#{country}", {}, filters)
|
18
18
|
end
|
19
19
|
|
20
20
|
def self.get_payout_methods(country, currency, filters = {})
|
data/lib/mangopay/version.rb
CHANGED
@@ -40,7 +40,7 @@ describe MangoPay::Client do
|
|
40
40
|
end
|
41
41
|
|
42
42
|
describe 'UPLOAD LOGO' do
|
43
|
-
|
43
|
+
xit 'accepts Base64 encoded file content' do
|
44
44
|
fnm = __FILE__.sub('.rb', '.png')
|
45
45
|
bts = File.open(fnm, 'rb') { |f| f.read }
|
46
46
|
b64 = Base64.encode64(bts)
|
@@ -48,7 +48,7 @@ describe MangoPay::Client do
|
|
48
48
|
expect(ret).to_not be_nil
|
49
49
|
end
|
50
50
|
|
51
|
-
|
51
|
+
xit 'accepts file path' do
|
52
52
|
fnm = __FILE__.sub('.rb', '.png')
|
53
53
|
ret = MangoPay::Client.upload_logo(nil, fnm)
|
54
54
|
expect(ret).to_not be_nil
|
@@ -24,6 +24,26 @@ describe MangoPay::Deposit do
|
|
24
24
|
|
25
25
|
assert_deposit(fetched_deposit, card_registration['CardId'], author["Id"])
|
26
26
|
end
|
27
|
+
|
28
|
+
it 'gets all deposits for a user' do
|
29
|
+
author = new_natural_user
|
30
|
+
card_registration = new_card_registration_completed
|
31
|
+
create_new_deposit(card_registration['CardId'], author['Id'])
|
32
|
+
|
33
|
+
result = MangoPay::Deposit.get_all_for_user(author['Id'])
|
34
|
+
expect(result).to be_kind_of(Array)
|
35
|
+
expect(result.count).to be > 0
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'gets all deposits for a card' do
|
39
|
+
author = new_natural_user
|
40
|
+
card_registration = new_card_registration_completed
|
41
|
+
create_new_deposit(card_registration['CardId'], author['Id'])
|
42
|
+
|
43
|
+
result = MangoPay::Deposit.get_all_for_card(card_registration['CardId'])
|
44
|
+
expect(result).to be_kind_of(Array)
|
45
|
+
expect(result.count).to be > 0
|
46
|
+
end
|
27
47
|
end
|
28
48
|
|
29
49
|
# the Cancel flow will be teste manually for now
|
@@ -21,22 +21,17 @@ describe MangoPay::IdentityVerification do
|
|
21
21
|
expect(created['ReturnUrl']).to eq(fetched['ReturnUrl'])
|
22
22
|
expect(created['Status']).to eq(fetched['Status'])
|
23
23
|
end
|
24
|
-
end
|
25
24
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
# expect(checks['LastUpdate']).not_to be_nil
|
37
|
-
# expect(checks['Checks']).not_to be_nil
|
38
|
-
# end
|
39
|
-
# end
|
25
|
+
it 'fetches all identity verifications for a user' do
|
26
|
+
create_new_identity_verification
|
27
|
+
user = new_natural_user
|
28
|
+
fetched = MangoPay::IdentityVerification.get_all(user['Id'])
|
29
|
+
|
30
|
+
expect(fetched).not_to be_nil
|
31
|
+
expect(fetched).to be_kind_of(Array)
|
32
|
+
expect(fetched).not_to be_empty
|
33
|
+
end
|
34
|
+
end
|
40
35
|
|
41
36
|
def create_new_identity_verification
|
42
37
|
user = new_natural_user
|
@@ -30,7 +30,7 @@ describe MangoPay::Recipient do
|
|
30
30
|
|
31
31
|
describe 'GET Schema' do
|
32
32
|
it 'fetches schema for LocalBankTransfer, Individual' do
|
33
|
-
schema = MangoPay::Recipient.get_schema('LocalBankTransfer', 'Individual', 'GBP')
|
33
|
+
schema = MangoPay::Recipient.get_schema('LocalBankTransfer', 'Individual', 'GBP', 'GB')
|
34
34
|
expect(schema).not_to be_nil
|
35
35
|
expect(schema['DisplayName']).not_to be_nil
|
36
36
|
expect(schema['Currency']).not_to be_nil
|
@@ -42,10 +42,11 @@ describe MangoPay::Recipient do
|
|
42
42
|
expect(schema['LocalBankTransfer']).not_to be_nil
|
43
43
|
expect(schema['BusinessRecipient']).to be_nil
|
44
44
|
expect(schema['InternationalBankTransfer']).to be_nil
|
45
|
+
expect(schema['Country']).not_to be_nil
|
45
46
|
end
|
46
47
|
|
47
48
|
it 'fetches schema for InternationalBankTransfer, Business' do
|
48
|
-
schema = MangoPay::Recipient.get_schema('InternationalBankTransfer', 'Business', 'GBP')
|
49
|
+
schema = MangoPay::Recipient.get_schema('InternationalBankTransfer', 'Business', 'GBP', 'GB')
|
49
50
|
expect(schema).not_to be_nil
|
50
51
|
expect(schema['DisplayName']).not_to be_nil
|
51
52
|
expect(schema['Currency']).not_to be_nil
|
@@ -57,6 +58,7 @@ describe MangoPay::Recipient do
|
|
57
58
|
expect(schema['InternationalBankTransfer']).not_to be_nil
|
58
59
|
expect(schema['IndividualRecipient']).to be_nil
|
59
60
|
expect(schema['LocalBankTransfer']).to be_nil
|
61
|
+
expect(schema['Country']).not_to be_nil
|
60
62
|
end
|
61
63
|
end
|
62
64
|
|
@@ -110,4 +112,5 @@ def assert_recipient(recipient)
|
|
110
112
|
expect(recipient['LocalBankTransfer']).not_to be_nil
|
111
113
|
expect(recipient['RecipientScope']).not_to be_nil
|
112
114
|
expect(recipient['UserId']).not_to be_nil
|
115
|
+
expect(recipient['Country']).not_to be_nil
|
113
116
|
end
|
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.
|
4
|
+
version: 3.34.0
|
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: 2025-
|
12
|
+
date: 2025-05-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|