mangopay 3.3.0 → 3.4.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 +23 -0
- data/lib/mangopay/errors.rb +9 -4
- data/lib/mangopay/pay_out.rb +5 -0
- data/lib/mangopay/version.rb +1 -1
- data/spec/mangopay/client_spec.png +0 -0
- data/spec/mangopay/configuration_spec.rb +5 -1
- data/spec/mangopay/dispute_spec.png +0 -0
- data/spec/mangopay/kyc_document_spec.png +0 -0
- data/spec/mangopay/payout_bankwire_spec.rb +9 -0
- data/spec/mangopay/shared_resources.rb +2 -1
- 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: f3be9c170462d86c30e551361cb135196086b166a5b4da755002635e6dffa367
|
4
|
+
data.tar.gz: f6cba5c6f4a1f3eacaa4fed0ffb484dacbf71e3d8b8f6a8cc16deca7387188ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50f20f836d5eb42c7122b2e5865d20dc6a566ad1433915eef235d9cc0dfef4d4cde39f949c050de0bfafa9510c8aa263d6091ebf7df126e77a222160db8250b2
|
7
|
+
data.tar.gz: 11a3cc3fb9ed24f8b791c331f2113bf35e388082f18f78063c3c2ded7c74d1d8cffe53016d0a4f4fc5ccb03f2a296b09fb73246801bf45b6a1011a065a78d2a0
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,26 @@
|
|
1
|
+
## [3.4.0] - 2021.05.27
|
2
|
+
## Added
|
3
|
+
|
4
|
+
### Instant payment
|
5
|
+
|
6
|
+
Mangopay introduces the instant payment mode. It allows payouts (transfer from wallet to user bank account) to be processed within 25 seconds, rather than the 48 hours for a standard payout.
|
7
|
+
|
8
|
+
You can now use this new type of payout with the Ruby SDK.
|
9
|
+
|
10
|
+
Example :
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
bankwire = MangoPay::PayOut::BankWire.get_bankwire(payout['Id'])
|
14
|
+
# where payout['Id'] is the id of an existing payout
|
15
|
+
```
|
16
|
+
|
17
|
+
Please note that this feature must be authorized and activated by MANGOPAY. More information [here](https://docs.mangopay.com/guide/instant-payment-payout).
|
18
|
+
|
19
|
+
### Accepted PRs
|
20
|
+
|
21
|
+
- Add support to create refunds for PayIn, Transfer and PayOut transactions.
|
22
|
+
- ResponseError object improvement
|
23
|
+
|
1
24
|
## [3.3.0]
|
2
25
|
## Fixed
|
3
26
|
|
data/lib/mangopay/errors.rb
CHANGED
@@ -49,12 +49,17 @@ module MangoPay
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def type; @details['Type']; end
|
52
|
-
def
|
52
|
+
def error; @details['error']; end
|
53
|
+
def errors; @details['errors'] || error; end
|
53
54
|
|
54
55
|
def message;
|
55
|
-
|
56
|
-
|
57
|
-
|
56
|
+
if error
|
57
|
+
msg = error
|
58
|
+
else
|
59
|
+
msg = @details['Message']
|
60
|
+
msg += errors.sort.map {|k,v| " #{k}: #{v}"}.join if (errors && errors.is_a?(Hash))
|
61
|
+
msg
|
62
|
+
end
|
58
63
|
end
|
59
64
|
|
60
65
|
end
|
data/lib/mangopay/pay_out.rb
CHANGED
data/lib/mangopay/version.rb
CHANGED
Binary file
|
@@ -6,7 +6,11 @@ describe MangoPay::Configuration do
|
|
6
6
|
c.client_id = 'test_asd'
|
7
7
|
c.client_apiKey = '00000'
|
8
8
|
MangoPay::User.fetch()
|
9
|
-
}.to raise_error
|
9
|
+
}.to raise_error { |err|
|
10
|
+
expect(err).to be_a MangoPay::ResponseError
|
11
|
+
expect(err.code).to eq '401'
|
12
|
+
expect(err.message).to eq 'invalid_client'
|
13
|
+
}
|
10
14
|
end
|
11
15
|
|
12
16
|
it 'goes ok when calling with correct client credentials' do
|
Binary file
|
Binary file
|
@@ -40,6 +40,15 @@ describe MangoPay::PayOut::BankWire, type: :feature do
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
+
describe 'Get Bankwire' do
|
44
|
+
it 'gets a bankwire' do
|
45
|
+
created = new_payout_bankwire
|
46
|
+
fetched = MangoPay::PayOut::BankWire.get_bankwire(created['Id'])
|
47
|
+
expect(fetched['Id']).to eq(created['Id'])
|
48
|
+
expect(fetched['CreationDate']).to eq(created['CreationDate'])
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
43
52
|
describe 'FETCH' do
|
44
53
|
it 'fetches a payout' do
|
45
54
|
created = new_payout_bankwire
|
@@ -439,7 +439,8 @@ shared_context 'payouts' do
|
|
439
439
|
Fees: {Currency: 'EUR', Amount: 0},
|
440
440
|
BankAccountId: new_bank_account['Id'],
|
441
441
|
Communication: 'This is a test',
|
442
|
-
Tag: 'Test PayOut/Bank/Wire'
|
442
|
+
Tag: 'Test PayOut/Bank/Wire',
|
443
|
+
PayoutModeRequested: 'Standard'
|
443
444
|
)
|
444
445
|
end
|
445
446
|
end
|
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.4.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-05-
|
12
|
+
date: 2021-05-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|