mangopay 3.8.0 → 3.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16def874b468b39fb00308d965802ef6a6fdb42ba9cb7d18a3a422a687d1d1fa
4
- data.tar.gz: 18f0e0c679919c7e5849ac5052fb2490bc619142901c11fee81ccc4e3dd46e33
3
+ metadata.gz: fc045823d669fd8b24b86394f37b4da942dfdcd2ffec8c766c969bef6c8109d2
4
+ data.tar.gz: e699732cf7cbeb8e9e54e918298913908ac0a88b2103d09b6e5086b1b8464907
5
5
  SHA512:
6
- metadata.gz: b0678869fba9e64e0cbf5ed3c4ca2d9fb579aa99b99ade388e2e314d32ee277c53d49f784f225e098a1dda540ace70f08dbd0da2fe4a08e62d8d639db4a912c6
7
- data.tar.gz: aac5ed97bc8e8e7aef927489c221a9428c54683e037c4059083f64b2003757761f511a74d84776c0a54e492754843d79eec2332a8c712768f3ec6e1863d5103d
6
+ metadata.gz: c97ac50d3dd3adb9848871d84e385dc22940a431ef85a942c37380ea8403737375ab9054e88f2bce8632ff00237ce4063288ee224db96d89e3edbe4657631414
7
+ data.tar.gz: 2eae8cc1edb4423c31461acaf7f0d8cd5ab9226e84209d3be12236cc2d1cd0ded88fd1c18166f8810628b684915c966de7b68d7208b93f4a55f65819bc6199e0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [3.9.0] - 2022.03.31
2
+ ### Added
3
+
4
+ #### Instant payment eligibility check
5
+
6
+ With the function
7
+ `PayOut::InstantPayoutEligibility::Reachability.create(params)`
8
+ the destination bank reachability can now be verified prior to making an instant payout. This results in a better user experience, as this preliminary check will allow the platform to propose the instant payout option only to end users whose bank is eligible.
9
+
1
10
  ## [3.8.0] - 2021.10.20
2
11
  ## Added
3
12
 
@@ -26,5 +26,16 @@ module MangoPay
26
26
  MangoPay.request(:get, url);
27
27
  end
28
28
  end
29
+
30
+ # See https://docs.mangopay.com/endpoints/v2.01/payouts#e1058_check-instant-payout-eligibility
31
+ module InstantPayoutEligibility
32
+ class Reachability < Resource
33
+ include HTTPCalls::Create
34
+
35
+ def self.url(*)
36
+ "#{MangoPay.api_path}/payouts/reachability"
37
+ end
38
+ end
39
+ end
29
40
  end
30
41
  end
@@ -1,3 +1,3 @@
1
1
  module MangoPay
2
- VERSION = '3.8.0'
2
+ VERSION = '3.9.0'
3
3
  end
@@ -11,7 +11,7 @@ describe MangoPay::PayIn::ApplePay::Direct, type: :feature do
11
11
 
12
12
  describe 'CREATE' do
13
13
  it 'creates a applepay direct payin' do
14
- #pending("no cards to test for")
14
+ pending("no cards to test for")
15
15
  created = new_payin_applepay_direct
16
16
  expect(created['Id']).not_to be_nil
17
17
  check_type_and_status(created)
@@ -49,6 +49,26 @@ describe MangoPay::PayOut::BankWire, type: :feature do
49
49
  end
50
50
  end
51
51
 
52
+ describe 'Check Eligibility' do
53
+ it 'checks the eligibility of a payout' do
54
+ created = new_payout_bankwire
55
+
56
+ eligibility = MangoPay::PayOut::InstantPayoutEligibility::Reachability.create(
57
+ AuthorId: created['AuthorId'],
58
+ DebitedFunds: {
59
+ Amount: 10,
60
+ Currency: 'EUR'
61
+ },
62
+ PayoutModeRequested: 'INSTANT_PAYMENT',
63
+ BankAccountId: created['BankAccountId'],
64
+ DebitedWalletId: created['DebitedWalletId']
65
+ )
66
+
67
+ expect(created).not_to be_nil
68
+ expect(eligibility).not_to be_nil
69
+ end
70
+ end
71
+
52
72
  describe 'FETCH' do
53
73
  it 'fetches a payout' do
54
74
  created = new_payout_bankwire
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.8.0
4
+ version: 3.9.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: 2021-10-20 00:00:00.000000000 Z
12
+ date: 2022-03-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json