mangopay4-ruby-sdk 3.49.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: 496595e3a0551d362d0c69d662cde17b4c859c734e6fb628d6101abcb5bcefea
4
- data.tar.gz: c32443ad0259ea64fed3273b9ab26225d70874e97d1d63d700a89ab140a985a1
3
+ metadata.gz: 7b63ea2f93f05821d77c50b02e536774d78f5e7f179cc4db8cd458e90f260570
4
+ data.tar.gz: 04e80c2683e4ad7d22a134cb1dfb8d50ed07cb71b477d9802974003924295720
5
5
  SHA512:
6
- metadata.gz: 9b4d7bc2f12d34834f67ef9f8cf8bb86eda154753afb882a33dd7e52161bf1cee2c3ec841e73558af8b81e355a3a7f0e79c83b6a8603daacc1ec28144959303c
7
- data.tar.gz: c382ac7dbc3d626ec639cbeb7b8d5977b103ffb0d027cee05e4453ff54208e98f7f6957061d6bb7b99d74808016655a9e68fb352df8f0378495a38016d8d9848
6
+ metadata.gz: 7ad2ef1b7126ddb8dc8d0ef67406f3b73631132e721ec5b4896f77e345682d53180f56a13be758e17decdc7f71433f5082c7f636b75bce1a6a9eff13fe01db9f
7
+ data.tar.gz: '0985e7d63ff431a41f3a1e766e2a52805e3e8145d499d1fbc017c185fbf69c7bbcabd5fbc948bed31f57e17e1966dc11c91830a95b758b57ce3eb40489377cb7'
data/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
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
+
10
+ ## [3.50.0] - 2026-07-13
11
+ ### Deprecated – Non-SCA users and deposit preauthorized complement pay-ins
12
+ - `MangoPay::LegalUser` create, get by id and update operations are deprecated. Use `MangoPay::LegalUserSca` instead.
13
+ - `MangoPay::NaturalUser` create, get by id and update operations are deprecated. Use `MangoPay::NaturalUserSca` instead.
14
+ - `MangoPay::PayIn::PreAuthorized::Direct.create_deposit_preauthorized_pay_in_prior_to_complement` is deprecated.
15
+ - `MangoPay::PayIn::PreAuthorized::Direct.create_deposit_preauthorized_pay_in_complement` is deprecated.
16
+
1
17
  ## [3.49.0] - 2026-05-21
2
18
  ### Added – PayPal Deposit Preauthorizations
3
19
  - Added `MangoPay::Deposit.create_paypal_preauthorization` to create a PayPal deposit preauthorization
@@ -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
@@ -2,6 +2,9 @@ module MangoPay
2
2
 
3
3
  # See http://docs.mangopay.com/api-references/users/legal-users/
4
4
  # See also parent class MangoPay::User
5
+ #
6
+ # <b>DEPRECATED</b>: The non-SCA legal user create, get by id and update
7
+ # operations are deprecated. Please use MangoPay::LegalUserSca instead.
5
8
  class LegalUser < User
6
9
 
7
10
  def self.url(id = nil)
@@ -1,6 +1,9 @@
1
1
  module MangoPay
2
2
 
3
3
  # See http://docs.mangopay.com/api-references/users/natural-users/
4
+ #
5
+ # <b>DEPRECATED</b>: The non-SCA natural user create, get by id and update
6
+ # operations are deprecated. Please use MangoPay::NaturalUserSca instead.
4
7
  class NaturalUser < User
5
8
 
6
9
  def self.url(id = nil)
@@ -63,11 +63,15 @@ module MangoPay
63
63
  MangoPay.request(:post, "#{MangoPay.api_path}/payins/deposit-preauthorized/direct/full-capture", params, {}, idempotency_key)
64
64
  end
65
65
 
66
+ # <b>DEPRECATED</b>: 'create_deposit_preauthorized_pay_in_prior_to_complement' function is now deprecated.
66
67
  def self.create_deposit_preauthorized_pay_in_prior_to_complement(params, idempotency_key = nil)
68
+ warn "[DEPRECATION] MangoPay::PayIn::PreAuthorized::Direct.create_deposit_preauthorized_pay_in_prior_to_complement is deprecated."
67
69
  MangoPay.request(:post, "#{MangoPay.api_path}/payins/deposit-preauthorized/direct/capture-with-complement", params, {}, idempotency_key)
68
70
  end
69
71
 
72
+ # <b>DEPRECATED</b>: 'create_deposit_preauthorized_pay_in_complement' function is now deprecated.
70
73
  def self.create_deposit_preauthorized_pay_in_complement(params, idempotency_key = nil)
74
+ warn "[DEPRECATION] MangoPay::PayIn::PreAuthorized::Direct.create_deposit_preauthorized_pay_in_complement is deprecated."
71
75
  MangoPay.request(:post, "#{MangoPay.api_path}/payins/deposit-preauthorized/direct/complement", params, {}, idempotency_key)
72
76
  end
73
77
  end
@@ -424,6 +428,10 @@ module MangoPay
424
428
  def cancel(intent_id, params, idempotency_key = nil)
425
429
  MangoPay.request(:post, "#{MangoPay.api_path_v3}/payins/intents/#{intent_id}/cancel", params, {}, idempotency_key)
426
430
  end
431
+
432
+ def get_external_providers_list
433
+ MangoPay.request(:get, "#{MangoPay.api_path_v3}/payins/intents/external-providers")
434
+ end
427
435
  end
428
436
  end
429
437
 
@@ -1,3 +1,3 @@
1
1
  module MangoPay
2
- VERSION = '3.49.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
@@ -77,7 +77,8 @@ describe MangoPay::PayIn::PayPal::Web, type: :feature do
77
77
  expect(created['dataCollectionId']).not_to be_nil
78
78
  end
79
79
 
80
- it 'fetches data collection' do
80
+ xit 'fetches data collection' do
81
+ # skipped because API 500 error
81
82
  created = MangoPay::PayIn::PayPal::Web.create_data_collection(get_data_collection_dto)
82
83
  fetched = MangoPay::PayIn::PayPal::Web.get_data_collection(created['dataCollectionId'])
83
84
  expect(fetched['DataCollectionId']).to eq(created['dataCollectionId'])
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.49.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-05-21 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