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 +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/mangopay/pay_out.rb +11 -0
- data/lib/mangopay/version.rb +1 -1
- data/spec/mangopay/payin_applepay_direct_spec.rb +1 -1
- data/spec/mangopay/payout_bankwire_spec.rb +20 -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: fc045823d669fd8b24b86394f37b4da942dfdcd2ffec8c766c969bef6c8109d2
|
4
|
+
data.tar.gz: e699732cf7cbeb8e9e54e918298913908ac0a88b2103d09b6e5086b1b8464907
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
data/lib/mangopay/pay_out.rb
CHANGED
@@ -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
|
data/lib/mangopay/version.rb
CHANGED
@@ -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
|
-
|
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.
|
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:
|
12
|
+
date: 2022-03-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|