mangopay4-ruby-sdk 3.50.0 → 3.51.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62c5cad1c06cda65af982d0bea42f8a3cde79beb1aa34b9307acf05eb2c0adda
4
- data.tar.gz: 8c3adf70afc028198e0cc6a3deb3b57b554f1601fb8651fe277d06cf9b7addd9
3
+ metadata.gz: 7b63ea2f93f05821d77c50b02e536774d78f5e7f179cc4db8cd458e90f260570
4
+ data.tar.gz: 04e80c2683e4ad7d22a134cb1dfb8d50ed07cb71b477d9802974003924295720
5
5
  SHA512:
6
- metadata.gz: 2a4b76ea41a71b1965b0f2e4b23466fe5435be13b1b94e0f45d705227a2ab4ac472adc1a98d7b0c1a531759f17e1c3aaff0bcc91bbfdb39c2b880fae1916c1e7
7
- data.tar.gz: 2e09c919825c59b394068d505f5e9fac9d6e1e6bd5696ad19e5de7edaaf8f24fd872f1f626c5bccc990886abbc0e74c800f1206a5b250ece0d23198d79c04a2f
6
+ metadata.gz: 7ad2ef1b7126ddb8dc8d0ef67406f3b73631132e721ec5b4896f77e345682d53180f56a13be758e17decdc7f71433f5082c7f636b75bce1a6a9eff13fe01db9f
7
+ data.tar.gz: '0985e7d63ff431a41f3a1e766e2a52805e3e8145d499d1fbc017c185fbf69c7bbcabd5fbc948bed31f57e17e1966dc11c91830a95b758b57ce3eb40489377cb7'
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [3.51.0] - 2026-08-17
2
+ ### Added – External providers list for PayIn Intents
3
+ #342
4
+ - Added `MangoPay::PayIn::PayInIntent::Intent.get_external_providers_list` to fetch the list of external providers available for pay-in intents
5
+
6
+ ### Added – PSC retry for Identity Verifications
7
+ #343
8
+ - Added `MangoPay::IdentityVerification.retry_psc` to request the retry of a PSC session, optionally passing the values to update
9
+
1
10
  ## [3.50.0] - 2026-07-13
2
11
  ### Deprecated – Non-SCA users and deposit preauthorized complement pay-ins
3
12
  - `MangoPay::LegalUser` create, get by id and update operations are deprecated. Use `MangoPay::LegalUserSca` instead.
@@ -12,5 +12,11 @@ module MangoPay
12
12
  def self.get_all(user_id, filters = {})
13
13
  MangoPay.request(:get, "#{MangoPay.api_path}/users/#{user_id}/identity-verifications", {}, filters)
14
14
  end
15
+
16
+ # Request the retry of a PSC session.
17
+ # +params+ can be empty or contain the values to be updated.
18
+ def self.retry_psc(identity_verification_id, psc_id, params = {})
19
+ MangoPay.request(:put, "#{MangoPay.api_path}/identity-verifications/#{identity_verification_id}/pscs/#{psc_id}/retry", params)
20
+ end
15
21
  end
16
22
  end
@@ -428,6 +428,10 @@ module MangoPay
428
428
  def cancel(intent_id, params, idempotency_key = nil)
429
429
  MangoPay.request(:post, "#{MangoPay.api_path_v3}/payins/intents/#{intent_id}/cancel", params, {}, idempotency_key)
430
430
  end
431
+
432
+ def get_external_providers_list
433
+ MangoPay.request(:get, "#{MangoPay.api_path_v3}/payins/intents/external-providers")
434
+ end
431
435
  end
432
436
  end
433
437
 
@@ -1,3 +1,3 @@
1
1
  module MangoPay
2
- VERSION = '3.50.0'
2
+ VERSION = '3.51.0'
3
3
  end
@@ -1,6 +1,9 @@
1
1
  describe MangoPay::IdentityVerification do
2
2
  include_context 'users'
3
3
 
4
+ IDV_ID_WITH_PSCS = 'idnver_01KZXBHDH1DWC887PW6T46NVTV'
5
+ PSC_ID = 'psc_x_01KZXBT5F8FGGSK9JXGCYMNWRP'
6
+
4
7
  describe 'CREATE' do
5
8
  it 'creates a new identity verification' do
6
9
  created = create_new_identity_verification
@@ -31,6 +34,47 @@ describe MangoPay::IdentityVerification do
31
34
  expect(fetched).to be_kind_of(Array)
32
35
  expect(fetched).not_to be_empty
33
36
  end
37
+
38
+ it 'fetches an identity verification with PSCs' do
39
+ fetched = MangoPay::IdentityVerification.get(IDV_ID_WITH_PSCS)
40
+
41
+ expect(fetched).not_to be_nil
42
+ expect(fetched['PSCs']).not_to be_nil
43
+ expect(fetched['PSCs']).not_to be_empty
44
+ expect(fetched['PSCs'][0]['Data']).not_to be_empty
45
+ end
46
+ end
47
+
48
+ describe 'RETRY PSC' do
49
+ # skipped: the PSC must be manually invalidated before testing
50
+ xit 'retries a PSC without update params' do
51
+ psc = MangoPay::IdentityVerification.retry_psc(IDV_ID_WITH_PSCS, PSC_ID)
52
+
53
+ expect(psc).not_to be_nil
54
+ expect(psc['HostedUrl']).not_to be_nil
55
+ expect(psc['Status']).to eq('PENDING_VALIDATION')
56
+ end
57
+
58
+ # skipped: the PSC must be manually invalidated before testing
59
+ xit 'retries a PSC with update params' do
60
+ first_name = SecureRandom.uuid
61
+ last_name = SecureRandom.uuid
62
+
63
+ psc = MangoPay::IdentityVerification.retry_psc(
64
+ IDV_ID_WITH_PSCS,
65
+ PSC_ID,
66
+ {
67
+ FirstName: first_name,
68
+ LastName: last_name
69
+ }
70
+ )
71
+
72
+ expect(psc).not_to be_nil
73
+ expect(psc['HostedUrl']).not_to be_nil
74
+ expect(psc['Status']).to eq('PENDING_VALIDATION')
75
+ expect(psc['FirstName']).to eq(first_name)
76
+ expect(psc['LastName']).to eq(last_name)
77
+ end
34
78
  end
35
79
 
36
80
  def create_new_identity_verification
@@ -49,6 +49,13 @@ describe MangoPay::PayIn::PayInIntent, type: :feature do
49
49
  expect(intent['Id']).to eq(fetched['Id'])
50
50
  expect(intent['Status']).to eq(fetched['Status'])
51
51
  end
52
+
53
+ it 'fetches the external providers list' do
54
+ response = MangoPay::PayIn::PayInIntent::Intent.get_external_providers_list
55
+ expect(response).not_to be_nil
56
+ expect(response).not_to be_empty
57
+ expect(response).to include('Mangopay')
58
+ end
52
59
  end
53
60
 
54
61
  describe 'CANCEL' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mangopay4-ruby-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.50.0
4
+ version: 3.51.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: 2026-07-16 00:00:00.000000000 Z
12
+ date: 2026-08-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json