mangopay 3.41.1 → 3.42.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: 1b9013971a3b6fe617300168a55fcf6cd0a970463786c857d102e1dc930ee173
4
- data.tar.gz: 62c67f789d9d1831d81bdf3a9940d340cd92be58a9b8f1ba451f48ea06f362c4
3
+ metadata.gz: 75e70fb3e6f0127887de7a15963f3d6da46eba5ae5e442e020cb68464540f3d9
4
+ data.tar.gz: 2925a4605e33e3c0325522cdd3657db592b87675172ceabeb749f321ce1af2e9
5
5
  SHA512:
6
- metadata.gz: a432296d798507df1115fcf3c51265e4b8be9b24fa15314116fd0e12514dbaf537c4d6020907cd0eb080d6694ef2d7820b584aa5c790cea091a43ab2956a4dff
7
- data.tar.gz: cd818297767715b6dc51a5ad5a24d2b3a93809cef3ead895d8b4a260e88da6326e0960d1009a256955767a4fc25b89d552cbd57d493e08a294d014ee64190e5e
6
+ metadata.gz: '016839ec01d68ffeeff441b0f144758b911febc7ad559808f65ef57baab454f21798cc9c52ff664b4fdcb6ed3bc54fea8d3b38e3c3e2801767d9fd793eb1f915'
7
+ data.tar.gz: 055ae925c27dc1aed17a0f41fa2585854f156b1b206d3661d990a8bf91dbfc83ca63199f3992e83604883466bb23c972547d3364fc1d1cb78a795efdeeceb076
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [3.42.0] - 2025-10-27
2
+ ### Added
3
+ - New [POST Manage proxy consent for a User](https://docs.mangopay.com/api-reference/users/manage-proxy-consent) endpoint to obtain and manage user consent via the hosted SCA experience (if proxy is activated). A proxy and user consent are now required to use the `USER_NOT_PRESENT` value for `ScaContext` ([API release note](https://docs.mangopay.com/release-notes/api/2025-10-23), #310)
4
+
5
+ ### Changed
6
+ - `x-tenant-id` deprecated as no longer necessary for UK platforms; the parameter is ignored by Mangopay (#309 )
7
+
1
8
  ## [3.41.1] - 2025-10-10
2
9
  ### Added
3
10
  - Configuration for `after_request_proc` to be able to check rate limits post-request (#301 - thank you @matteeyah and @robertfall for the contribution 🙏)
data/lib/mangopay/user.rb CHANGED
@@ -11,11 +11,15 @@ module MangoPay
11
11
  include HTTPCalls::Update
12
12
  include HTTPCalls::Fetch
13
13
  class << self
14
- def enroll_sca(user_id)
14
+ def enroll_sca(user_id, idempotency_key = nil)
15
15
  url = "#{MangoPay.api_path}/sca/users/#{user_id}/enrollment"
16
- MangoPay.request(:post, url, {}, {})
16
+ MangoPay.request(:post, url, {}, {}, idempotency_key)
17
17
  end
18
18
 
19
+ def manage_consent(user_id, idempotency_key = nil)
20
+ url = "#{MangoPay.api_path}/sca/users/#{user_id}/consent"
21
+ MangoPay.request(:post, url, {}, {}, idempotency_key)
22
+ end
19
23
 
20
24
  # Fetches list of wallets belonging to the given +user_id+.
21
25
  # Optional +filters+ is a hash accepting following keys:
@@ -1,3 +1,3 @@
1
1
  module MangoPay
2
- VERSION = '3.41.1'
2
+ VERSION = '3.42.0'
3
3
  end
data/lib/mangopay.rb CHANGED
@@ -118,6 +118,8 @@ module MangoPay
118
118
  end
119
119
 
120
120
  def uk_header_flag
121
+ warn "[DEPRECATION] `uk_header_flag` is deprecated and will be removed in a future version. " \
122
+ "Please update your configuration accordingly."
121
123
  @uk_header_flag || false
122
124
  end
123
125
  end
@@ -161,6 +161,18 @@ describe MangoPay::User do
161
161
  end
162
162
  end
163
163
 
164
+ describe 'MANAGE CONSENT' do
165
+ it 'manages consent' do
166
+ user = new_natural_user
167
+
168
+ enrollment_result = MangoPay::User.enroll_sca(user['Id'])
169
+ expect(enrollment_result["PendingUserAction"]["RedirectUrl"]).not_to be_nil
170
+
171
+ consent_result = MangoPay::User.manage_consent(user['Id'])
172
+ expect(consent_result["PendingUserAction"]["RedirectUrl"]).not_to be_nil
173
+ end
174
+ end
175
+
164
176
  describe 'FETCH' do
165
177
  it 'fetches all the users' do
166
178
  users = MangoPay::User.fetch()
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.41.1
4
+ version: 3.42.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-10-10 00:00:00.000000000 Z
12
+ date: 2025-10-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json