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 +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/mangopay/user.rb +6 -2
- data/lib/mangopay/version.rb +1 -1
- data/lib/mangopay.rb +2 -0
- data/spec/mangopay/user_spec.rb +12 -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: 75e70fb3e6f0127887de7a15963f3d6da46eba5ae5e442e020cb68464540f3d9
         | 
| 4 | 
            +
              data.tar.gz: 2925a4605e33e3c0325522cdd3657db592b87675172ceabeb749f321ce1af2e9
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 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:
         | 
    
        data/lib/mangopay/version.rb
    CHANGED
    
    
    
        data/lib/mangopay.rb
    CHANGED
    
    
    
        data/spec/mangopay/user_spec.rb
    CHANGED
    
    | @@ -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. | 
| 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- | 
| 12 | 
            +
            date: 2025-10-27 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: multi_json
         |