mangopay 3.4.0 → 3.26.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/.github/workflows/ruby_cd.yml +34 -0
- data/.github/workflows/ruby_ci.yml +30 -0
- data/CHANGELOG.md +249 -4
- data/README.md +19 -0
- data/lib/mangopay/authorization_token.rb +1 -1
- data/lib/mangopay/bankingaliases_iban.rb +2 -2
- data/lib/mangopay/card.rb +10 -0
- data/lib/mangopay/client.rb +0 -5
- data/lib/mangopay/conversion.rb +39 -0
- data/lib/mangopay/deposit.rb +20 -0
- data/lib/mangopay/dispute.rb +2 -2
- data/lib/mangopay/errors.rb +2 -2
- data/lib/mangopay/filter_parameters.rb +7 -2
- data/lib/mangopay/pay_in.rb +150 -1
- data/lib/mangopay/pay_out.rb +11 -0
- data/lib/mangopay/payment_method_metadata.rb +13 -0
- data/lib/mangopay/refund.rb +1 -0
- data/lib/mangopay/regulatory.rb +22 -0
- data/lib/mangopay/ubo_declaration.rb +6 -4
- data/lib/mangopay/version.rb +1 -1
- data/lib/mangopay.rb +102 -8
- data/spec/mangopay/bankingaliases_spec.rb +1 -1
- data/spec/mangopay/card_registration_spec.rb +17 -2
- data/spec/mangopay/client_spec.rb +12 -12
- data/spec/mangopay/configuration_spec.rb +98 -0
- data/spec/mangopay/conversion_spec.rb +64 -0
- data/spec/mangopay/deposit_spec.rb +75 -0
- data/spec/mangopay/kyc_document_spec.rb +1 -0
- data/spec/mangopay/payin_applepay_direct_spec.rb +1 -1
- data/spec/mangopay/payin_bancontact_web_spec.rb +30 -0
- data/spec/mangopay/payin_blik_web_spec.rb +32 -0
- data/spec/mangopay/payin_giropay_web_spec.rb +30 -0
- data/spec/mangopay/payin_googlepay_direct_spec.rb +21 -0
- data/spec/mangopay/payin_ideal_web_spec.rb +30 -0
- data/spec/mangopay/payin_klarna_web_spec.rb +32 -0
- data/spec/mangopay/payin_mbway_web_spec.rb +32 -0
- data/spec/mangopay/payin_multibanco_web_spec.rb +31 -0
- data/spec/mangopay/payin_payconiq_web_spec.rb +25 -0
- data/spec/mangopay/payin_paypal_web_spec.rb +21 -0
- data/spec/mangopay/payin_preauthorized_direct_spec.rb +21 -1
- data/spec/mangopay/payin_satispay_web_spec.rb +32 -0
- data/spec/mangopay/payment_method_metadata_spec.rb +15 -0
- data/spec/mangopay/payout_bankwire_spec.rb +20 -0
- data/spec/mangopay/preauthorization_spec.rb +1 -2
- data/spec/mangopay/recurring_payin_spec.rb +82 -0
- data/spec/mangopay/regulatory_spec.rb +26 -0
- data/spec/mangopay/shared_resources.rb +714 -219
- data/spec/mangopay/transaction_spec.rb +5 -0
- data/spec/mangopay/ubo_declaration_spec.rb +14 -3
- data/spec/mangopay/ubo_spec.rb +3 -3
- data/spec/mangopay/user_spec.rb +16 -1
- data/spec/mangopay/wallet_spec.rb +5 -0
- metadata +39 -4
- data/.travis.yml +0 -19
@@ -22,6 +22,8 @@ describe MangoPay::Transaction do
|
|
22
22
|
it 'fetches list with two transactions after payin and payout done' do
|
23
23
|
payin = new_payin_card_direct
|
24
24
|
payout = create_new_payout_bankwire(payin)
|
25
|
+
# wait for the transactions to be created
|
26
|
+
sleep(2)
|
25
27
|
transactions = MangoPay::Transaction.fetch(new_wallet['Id'])
|
26
28
|
|
27
29
|
expect(transactions).to be_kind_of(Array)
|
@@ -37,6 +39,9 @@ describe MangoPay::Transaction do
|
|
37
39
|
payout = create_new_payout_bankwire(payin)
|
38
40
|
wallet_id = new_wallet['Id']
|
39
41
|
|
42
|
+
# wait for the transactions to be created
|
43
|
+
sleep(2)
|
44
|
+
|
40
45
|
by_nature_reg = MangoPay::Transaction.fetch(wallet_id, {'Nature' => 'REGULAR'})
|
41
46
|
by_nature_ref = MangoPay::Transaction.fetch(wallet_id, {'Nature' => 'REFUND'})
|
42
47
|
expect(by_nature_reg.count).to eq 2
|
@@ -6,9 +6,20 @@ describe MangoPay::UboDeclaration do
|
|
6
6
|
it 'can fetch a UBO declaration' do
|
7
7
|
legal_user = new_legal_user
|
8
8
|
|
9
|
+
ubo_declaration = MangoPay::UboDeclaration.create(legal_user['Id'])
|
10
|
+
|
11
|
+
ubo_declaration_byId = MangoPay::UboDeclaration.fetch(legal_user['Id'], ubo_declaration['Id'])
|
12
|
+
|
13
|
+
expect(ubo_declaration).not_to be_nil
|
14
|
+
expect(ubo_declaration_byId).not_to be_nil
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'fetches ubo declaration just by id' do
|
18
|
+
legal_user = new_legal_user
|
19
|
+
|
9
20
|
ubo_declaration = MangoPay::UboDeclaration.create(legal_user['Id'], nil)
|
10
21
|
|
11
|
-
ubo_declaration_byId = MangoPay::UboDeclaration.fetch(
|
22
|
+
ubo_declaration_byId = MangoPay::UboDeclaration.fetch(nil, ubo_declaration['Id'], nil)
|
12
23
|
|
13
24
|
expect(ubo_declaration).not_to be_nil
|
14
25
|
expect(ubo_declaration_byId).not_to be_nil
|
@@ -17,13 +28,13 @@ describe MangoPay::UboDeclaration do
|
|
17
28
|
describe 'UPDATE' do
|
18
29
|
it 'can update a UBO declaration' do
|
19
30
|
legal_user = new_legal_user
|
20
|
-
ubo_declaration = MangoPay::UboDeclaration.create(legal_user['Id']
|
31
|
+
ubo_declaration = MangoPay::UboDeclaration.create(legal_user['Id'])
|
21
32
|
ubo_declaration['Status'] = 'VALIDATION_ASKED'
|
22
33
|
|
23
34
|
ubo = new_ubo(legal_user, ubo_declaration)
|
24
35
|
|
25
36
|
ubo_declaration['Ubos'] = [ubo]
|
26
|
-
ubo_declaration = MangoPay::UboDeclaration.update(legal_user['Id'], ubo_declaration['Id'], ubo_declaration
|
37
|
+
ubo_declaration = MangoPay::UboDeclaration.update(legal_user['Id'], ubo_declaration['Id'], ubo_declaration)
|
27
38
|
|
28
39
|
expect(ubo_declaration).not_to be_nil
|
29
40
|
expect(ubo_declaration['Status']).to eq 'VALIDATION_ASKED'
|
data/spec/mangopay/ubo_spec.rb
CHANGED
@@ -5,7 +5,7 @@ describe MangoPay::Ubo do
|
|
5
5
|
describe 'FETCH' do
|
6
6
|
it 'can fetch a Ubo' do
|
7
7
|
legal_user = new_legal_user
|
8
|
-
ubo_declaration = MangoPay::UboDeclaration.create(legal_user['Id']
|
8
|
+
ubo_declaration = MangoPay::UboDeclaration.create(legal_user['Id'])
|
9
9
|
ubo = new_ubo(legal_user, ubo_declaration)
|
10
10
|
result = MangoPay::Ubo.fetch(legal_user['Id'], ubo_declaration['Id'], ubo['Id'])
|
11
11
|
expect(result).not_to be_nil
|
@@ -16,7 +16,7 @@ describe MangoPay::Ubo do
|
|
16
16
|
describe 'CREATE' do
|
17
17
|
it 'can create a new Ubo' do
|
18
18
|
legal_user = new_legal_user
|
19
|
-
ubo_declaration = MangoPay::UboDeclaration.create(legal_user['Id']
|
19
|
+
ubo_declaration = MangoPay::UboDeclaration.create(legal_user['Id'])
|
20
20
|
result = new_ubo(legal_user, ubo_declaration)
|
21
21
|
expect(result).not_to be_nil
|
22
22
|
end
|
@@ -25,7 +25,7 @@ describe MangoPay::Ubo do
|
|
25
25
|
describe 'UPDATE' do
|
26
26
|
it 'can update a Ubo' do
|
27
27
|
legal_user = new_legal_user
|
28
|
-
ubo_declaration = MangoPay::UboDeclaration.create(legal_user['Id']
|
28
|
+
ubo_declaration = MangoPay::UboDeclaration.create(legal_user['Id'])
|
29
29
|
ubo = new_ubo(legal_user, ubo_declaration)
|
30
30
|
ubo['FirstName'] = 'Santa'
|
31
31
|
ubo['LastName'] = 'Clause'
|
data/spec/mangopay/user_spec.rb
CHANGED
@@ -33,6 +33,20 @@ describe MangoPay::User do
|
|
33
33
|
})
|
34
34
|
expect(updated_user['LegalRepresentativeFirstName']).to eq('Jack')
|
35
35
|
end
|
36
|
+
|
37
|
+
it 'updates a natural user terms and conditions accepted' do
|
38
|
+
updated_user = MangoPay::NaturalUser.update(new_natural_user['Id'] ,{
|
39
|
+
TermsAndConditionsAccepted: true
|
40
|
+
})
|
41
|
+
expect(updated_user['TermsAndConditionsAccepted']).to eq(true)
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'updates a legal user terms and conditions accepted' do
|
45
|
+
updated_user = MangoPay::LegalUser.update(new_legal_user['Id'], {
|
46
|
+
TermsAndConditionsAccepted: true
|
47
|
+
})
|
48
|
+
expect(updated_user['TermsAndConditionsAccepted']).to eq(true)
|
49
|
+
end
|
36
50
|
end
|
37
51
|
|
38
52
|
describe 'FETCH' do
|
@@ -81,6 +95,8 @@ describe MangoPay::User do
|
|
81
95
|
it 'fetches list with two transactions after payin and payout done' do
|
82
96
|
payin = new_payin_card_direct
|
83
97
|
payout = create_new_payout_bankwire(payin)
|
98
|
+
# wait for the transactions to be created
|
99
|
+
sleep(2)
|
84
100
|
transactions = MangoPay::User.transactions(new_natural_user['Id'])
|
85
101
|
|
86
102
|
expect(transactions).to be_kind_of(Array)
|
@@ -128,7 +144,6 @@ describe MangoPay::User do
|
|
128
144
|
fetched = MangoPay::Card.fetch(card['CardId'])
|
129
145
|
|
130
146
|
expect(fetched['Id']).not_to be_nil
|
131
|
-
expect(fetched['Id'].to_i).to be > 0
|
132
147
|
expect(fetched['UserId']).to eq(new_natural_user["Id"])
|
133
148
|
expect(fetched['Currency']).to eq('EUR')
|
134
149
|
end
|
@@ -48,6 +48,8 @@ describe MangoPay::Wallet do
|
|
48
48
|
it 'fetches list with two transactions after payin and payout done' do
|
49
49
|
payin = new_payin_card_direct
|
50
50
|
payout = create_new_payout_bankwire(payin)
|
51
|
+
# wait for the transactions to be created
|
52
|
+
sleep(2)
|
51
53
|
transactions = MangoPay::Wallet.transactions(new_wallet['Id'])
|
52
54
|
|
53
55
|
expect(transactions).to be_kind_of(Array)
|
@@ -63,6 +65,9 @@ describe MangoPay::Wallet do
|
|
63
65
|
payout = create_new_payout_bankwire(payin)
|
64
66
|
wallet_id = new_wallet['Id']
|
65
67
|
|
68
|
+
# wait for the transactions to be created
|
69
|
+
sleep(2)
|
70
|
+
|
66
71
|
by_nature_reg = MangoPay::Wallet.transactions(wallet_id, {'Nature' => 'REGULAR'})
|
67
72
|
by_nature_ref = MangoPay::Wallet.transactions(wallet_id, {'Nature' => 'REFUND'})
|
68
73
|
expect(by_nature_reg.count).to eq 2
|
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.26.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: 2024-08-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -63,9 +63,10 @@ executables:
|
|
63
63
|
extensions: []
|
64
64
|
extra_rdoc_files: []
|
65
65
|
files:
|
66
|
+
- ".github/workflows/ruby_cd.yml"
|
67
|
+
- ".github/workflows/ruby_ci.yml"
|
66
68
|
- ".gitignore"
|
67
69
|
- ".rspec"
|
68
|
-
- ".travis.yml"
|
69
70
|
- CHANGELOG.md
|
70
71
|
- Gemfile
|
71
72
|
- LICENSE
|
@@ -81,6 +82,8 @@ files:
|
|
81
82
|
- lib/mangopay/card.rb
|
82
83
|
- lib/mangopay/card_registration.rb
|
83
84
|
- lib/mangopay/client.rb
|
85
|
+
- lib/mangopay/conversion.rb
|
86
|
+
- lib/mangopay/deposit.rb
|
84
87
|
- lib/mangopay/dispute.rb
|
85
88
|
- lib/mangopay/errors.rb
|
86
89
|
- lib/mangopay/event.rb
|
@@ -94,8 +97,10 @@ files:
|
|
94
97
|
- lib/mangopay/natural_user.rb
|
95
98
|
- lib/mangopay/pay_in.rb
|
96
99
|
- lib/mangopay/pay_out.rb
|
100
|
+
- lib/mangopay/payment_method_metadata.rb
|
97
101
|
- lib/mangopay/pre_authorization.rb
|
98
102
|
- lib/mangopay/refund.rb
|
103
|
+
- lib/mangopay/regulatory.rb
|
99
104
|
- lib/mangopay/report.rb
|
100
105
|
- lib/mangopay/resource.rb
|
101
106
|
- lib/mangopay/transaction.rb
|
@@ -113,6 +118,8 @@ files:
|
|
113
118
|
- spec/mangopay/client_spec.png
|
114
119
|
- spec/mangopay/client_spec.rb
|
115
120
|
- spec/mangopay/configuration_spec.rb
|
121
|
+
- spec/mangopay/conversion_spec.rb
|
122
|
+
- spec/mangopay/deposit_spec.rb
|
116
123
|
- spec/mangopay/dispute_spec.png
|
117
124
|
- spec/mangopay/dispute_spec.rb
|
118
125
|
- spec/mangopay/event_spec.rb
|
@@ -124,17 +131,30 @@ files:
|
|
124
131
|
- spec/mangopay/log_requests_filter_spec.rb
|
125
132
|
- spec/mangopay/mandate_spec.rb
|
126
133
|
- spec/mangopay/payin_applepay_direct_spec.rb
|
134
|
+
- spec/mangopay/payin_bancontact_web_spec.rb
|
127
135
|
- spec/mangopay/payin_bankwire_direct_spec.rb
|
128
136
|
- spec/mangopay/payin_bankwire_external_instruction_spec.rb
|
137
|
+
- spec/mangopay/payin_blik_web_spec.rb
|
129
138
|
- spec/mangopay/payin_card_direct_spec.rb
|
130
139
|
- spec/mangopay/payin_card_web_spec.rb
|
131
140
|
- spec/mangopay/payin_directdebit_direct_spec.rb
|
132
141
|
- spec/mangopay/payin_directdebit_web_spec.rb
|
142
|
+
- spec/mangopay/payin_giropay_web_spec.rb
|
143
|
+
- spec/mangopay/payin_googlepay_direct_spec.rb
|
144
|
+
- spec/mangopay/payin_ideal_web_spec.rb
|
145
|
+
- spec/mangopay/payin_klarna_web_spec.rb
|
146
|
+
- spec/mangopay/payin_mbway_web_spec.rb
|
147
|
+
- spec/mangopay/payin_multibanco_web_spec.rb
|
148
|
+
- spec/mangopay/payin_payconiq_web_spec.rb
|
133
149
|
- spec/mangopay/payin_paypal_web_spec.rb
|
134
150
|
- spec/mangopay/payin_preauthorized_direct_spec.rb
|
151
|
+
- spec/mangopay/payin_satispay_web_spec.rb
|
152
|
+
- spec/mangopay/payment_method_metadata_spec.rb
|
135
153
|
- spec/mangopay/payout_bankwire_spec.rb
|
136
154
|
- spec/mangopay/preauthorization_spec.rb
|
155
|
+
- spec/mangopay/recurring_payin_spec.rb
|
137
156
|
- spec/mangopay/refund_spec.rb
|
157
|
+
- spec/mangopay/regulatory_spec.rb
|
138
158
|
- spec/mangopay/report_spec.rb
|
139
159
|
- spec/mangopay/report_wallets_spec.rb
|
140
160
|
- spec/mangopay/shared_resources.rb
|
@@ -165,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
185
|
- !ruby/object:Gem::Version
|
166
186
|
version: '0'
|
167
187
|
requirements: []
|
168
|
-
rubygems_version: 3.0.
|
188
|
+
rubygems_version: 3.0.3.1
|
169
189
|
signing_key:
|
170
190
|
specification_version: 4
|
171
191
|
summary: Ruby bindings for the version 2 of the MANGOPAY API
|
@@ -177,6 +197,8 @@ test_files:
|
|
177
197
|
- spec/mangopay/client_spec.png
|
178
198
|
- spec/mangopay/client_spec.rb
|
179
199
|
- spec/mangopay/configuration_spec.rb
|
200
|
+
- spec/mangopay/conversion_spec.rb
|
201
|
+
- spec/mangopay/deposit_spec.rb
|
180
202
|
- spec/mangopay/dispute_spec.png
|
181
203
|
- spec/mangopay/dispute_spec.rb
|
182
204
|
- spec/mangopay/event_spec.rb
|
@@ -188,17 +210,30 @@ test_files:
|
|
188
210
|
- spec/mangopay/log_requests_filter_spec.rb
|
189
211
|
- spec/mangopay/mandate_spec.rb
|
190
212
|
- spec/mangopay/payin_applepay_direct_spec.rb
|
213
|
+
- spec/mangopay/payin_bancontact_web_spec.rb
|
191
214
|
- spec/mangopay/payin_bankwire_direct_spec.rb
|
192
215
|
- spec/mangopay/payin_bankwire_external_instruction_spec.rb
|
216
|
+
- spec/mangopay/payin_blik_web_spec.rb
|
193
217
|
- spec/mangopay/payin_card_direct_spec.rb
|
194
218
|
- spec/mangopay/payin_card_web_spec.rb
|
195
219
|
- spec/mangopay/payin_directdebit_direct_spec.rb
|
196
220
|
- spec/mangopay/payin_directdebit_web_spec.rb
|
221
|
+
- spec/mangopay/payin_giropay_web_spec.rb
|
222
|
+
- spec/mangopay/payin_googlepay_direct_spec.rb
|
223
|
+
- spec/mangopay/payin_ideal_web_spec.rb
|
224
|
+
- spec/mangopay/payin_klarna_web_spec.rb
|
225
|
+
- spec/mangopay/payin_mbway_web_spec.rb
|
226
|
+
- spec/mangopay/payin_multibanco_web_spec.rb
|
227
|
+
- spec/mangopay/payin_payconiq_web_spec.rb
|
197
228
|
- spec/mangopay/payin_paypal_web_spec.rb
|
198
229
|
- spec/mangopay/payin_preauthorized_direct_spec.rb
|
230
|
+
- spec/mangopay/payin_satispay_web_spec.rb
|
231
|
+
- spec/mangopay/payment_method_metadata_spec.rb
|
199
232
|
- spec/mangopay/payout_bankwire_spec.rb
|
200
233
|
- spec/mangopay/preauthorization_spec.rb
|
234
|
+
- spec/mangopay/recurring_payin_spec.rb
|
201
235
|
- spec/mangopay/refund_spec.rb
|
236
|
+
- spec/mangopay/regulatory_spec.rb
|
202
237
|
- spec/mangopay/report_spec.rb
|
203
238
|
- spec/mangopay/report_wallets_spec.rb
|
204
239
|
- spec/mangopay/shared_resources.rb
|
data/.travis.yml
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
rvm:
|
3
|
-
# - 2.0.0
|
4
|
-
# - 2.1
|
5
|
-
# - 2.2
|
6
|
-
# - 2.3
|
7
|
-
# - 2.4
|
8
|
-
- 2.5
|
9
|
-
script:
|
10
|
-
- if [ $TRAVIS_BRANCH != "release" ]; then bundle exec rspec; fi
|
11
|
-
deploy:
|
12
|
-
provider: rubygems
|
13
|
-
api_key:
|
14
|
-
secure: gvlnYEh9cyL+mYeudKzlD+2Po+LgIzCjHzggJH+WDcbtgxlGAFpxbVJOOm/KY8VKhMgIudNV7FJl4Gl4rrG8JjNxbb+qM57ypU3yyDcUesQ+uj0DnN+xszv7M+XtcRQMlhkStawoj/E0QMYBPkAAr1lBpPIFQdC17GDkdn5XvaQ=
|
15
|
-
gem: mangopay
|
16
|
-
on:
|
17
|
-
tags: false
|
18
|
-
repo: Mangopay/mangopay2-ruby-sdk
|
19
|
-
branch: release
|