mollie-api-ruby 4.7.1 → 4.9.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 +8 -0
- data/examples/settlements/list-captures.rb +1 -0
- data/lib/mollie/organization.rb +4 -0
- data/lib/mollie/settlement/capture.rb +6 -0
- data/lib/mollie/settlement.rb +4 -0
- data/lib/mollie/version.rb +1 -1
- data/lib/mollie.rb +1 -0
- data/test/fixtures/shipments/get.json +1 -1
- data/test/mollie/organization_test.rb +6 -1
- data/test/mollie/settlement_test.rb +15 -1
- metadata +47 -46
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: daa3c6e8a7c880ce66a0207c1ea3785e013095d605ad0c3a39b52fe0675c0bab
|
4
|
+
data.tar.gz: 67135ecb024b74073aa35a0235a929d0a17c2f2ddf495d74eb47afc098963653
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b7deb45b0c8537e38f4f72640398eb93a9a90108fefa9930b2575f8cb9e3c03cbaacdab2e37062d318cedbabe73d4f37a662627440605c1967388026763c015
|
7
|
+
data.tar.gz: 1d18195babbf2b7a4204849e1ff4fcaf57ce49fbaec01fe238d43cadb2319f01cab3fd08bdad56e745bbcac6748358e33730b564e2b5667f9f8ab3307780a252
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,14 @@
|
|
4
4
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
6
6
|
|
7
|
+
## 4.9.0 - 2020-05-17
|
8
|
+
|
9
|
+
- Settlement: add `captures` helper method.
|
10
|
+
|
11
|
+
## 4.8.0 - 2020-05-12
|
12
|
+
|
13
|
+
- Implement API features and changes from the changelog up to and including Friday, April 3rd, 2020.
|
14
|
+
|
7
15
|
## 4.7.1 - 2020-02-13
|
8
16
|
|
9
17
|
- Fix `Capture#shipment` API call.
|
@@ -0,0 +1 @@
|
|
1
|
+
captures = Mollie::Settlement::Capture.all(settlement_id: 'stl_jDk30akdN')
|
data/lib/mollie/organization.rb
CHANGED
data/lib/mollie/settlement.rb
CHANGED
@@ -77,6 +77,10 @@ module Mollie
|
|
77
77
|
Settlement::Chargeback.all(options.merge(settlement_id: id))
|
78
78
|
end
|
79
79
|
|
80
|
+
def captures(options = {})
|
81
|
+
Settlement::Capture.all(options.merge(settlement_id: id))
|
82
|
+
end
|
83
|
+
|
80
84
|
def invoice(options = {})
|
81
85
|
return if invoice_id.nil?
|
82
86
|
Invoice.get(invoice_id, options)
|
data/lib/mollie/version.rb
CHANGED
data/lib/mollie.rb
CHANGED
@@ -38,6 +38,7 @@ require 'mollie/order/shipment'
|
|
38
38
|
require 'mollie/payment/capture'
|
39
39
|
require 'mollie/payment/chargeback'
|
40
40
|
require 'mollie/payment/refund'
|
41
|
+
require 'mollie/settlement/capture'
|
41
42
|
require 'mollie/settlement/chargeback'
|
42
43
|
require 'mollie/settlement/payment'
|
43
44
|
require 'mollie/settlement/refund'
|
@@ -21,7 +21,11 @@ module Mollie
|
|
21
21
|
'self' => {
|
22
22
|
'href' => 'https://api.mollie.com/v2/organizations/org_12345678',
|
23
23
|
'type' => 'application/hal+json'
|
24
|
-
|
24
|
+
},
|
25
|
+
'dashboard' => {
|
26
|
+
'href' => 'https://mollie.com/dashboard/org_12345678',
|
27
|
+
'type' => 'text/html'
|
28
|
+
},
|
25
29
|
'documentation' => {
|
26
30
|
'href' => 'https://docs.mollie.com/reference/v2/organizations-api/get-organization',
|
27
31
|
'type' => 'text/html'
|
@@ -43,6 +47,7 @@ module Mollie
|
|
43
47
|
assert_equal 'NL815839091B01', organization.vat_number
|
44
48
|
assert_equal 'dutch', organization.vat_regulation
|
45
49
|
assert_equal 'https://api.mollie.com/v2/organizations/org_12345678', organization.links['self']['href']
|
50
|
+
assert_equal 'https://mollie.com/dashboard/org_12345678', organization.dashboard_url
|
46
51
|
end
|
47
52
|
|
48
53
|
def test_current_organization
|
@@ -90,7 +90,8 @@ module Mollie
|
|
90
90
|
currency: 'EUR'
|
91
91
|
}
|
92
92
|
}
|
93
|
-
]
|
93
|
+
],
|
94
|
+
invoice_id: 'inv_FrvewDA3Pr'
|
94
95
|
}
|
95
96
|
}
|
96
97
|
},
|
@@ -149,6 +150,8 @@ module Mollie
|
|
149
150
|
assert_equal '0.5000', settlement.periods[:'2015'][:'11'].costs[1].amount_net.value
|
150
151
|
assert_equal '0.1050', settlement.periods[:'2015'][:'11'].costs[1].amount_vat.value
|
151
152
|
assert_equal '0.6050', settlement.periods[:'2015'][:'11'].costs[1].amount_gross.value
|
153
|
+
|
154
|
+
assert_equal 'inv_FrvewDA3Pr', settlement.periods[:'2015'][:'11'].invoice_id
|
152
155
|
end
|
153
156
|
|
154
157
|
def test_status_open
|
@@ -224,6 +227,17 @@ module Mollie
|
|
224
227
|
assert_equal 'chb-id', chargebacks.first.id
|
225
228
|
end
|
226
229
|
|
230
|
+
def test_list_captures
|
231
|
+
stub_request(:get, 'https://api.mollie.com/v2/settlements/stl-id/captures')
|
232
|
+
.to_return(status: 200, body: %(
|
233
|
+
{ "_embedded" : {"captures" : [{ "id": "cpt-id", "settlement_id": "stl-id" }]}}
|
234
|
+
), headers: {})
|
235
|
+
|
236
|
+
captures = Settlement.new(id: 'stl-id').captures
|
237
|
+
assert_equal Settlement::Capture, captures.klass
|
238
|
+
assert_equal 'cpt-id', captures.first.id
|
239
|
+
end
|
240
|
+
|
227
241
|
def test_get_invoice
|
228
242
|
stub_request(:get, 'https://api.mollie.com/v2/settlements/stl_jDk30akdN')
|
229
243
|
.to_return(
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mollie-api-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mollie B.V.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -158,6 +158,7 @@ files:
|
|
158
158
|
- examples/refunds/get.rb
|
159
159
|
- examples/refunds/list.rb
|
160
160
|
- examples/settlements/get.rb
|
161
|
+
- examples/settlements/list-captures.rb
|
161
162
|
- examples/settlements/list-chargebacks.rb
|
162
163
|
- examples/settlements/list-payments.rb
|
163
164
|
- examples/settlements/list-refunds.rb
|
@@ -203,6 +204,7 @@ files:
|
|
203
204
|
- lib/mollie/profile.rb
|
204
205
|
- lib/mollie/refund.rb
|
205
206
|
- lib/mollie/settlement.rb
|
207
|
+
- lib/mollie/settlement/capture.rb
|
206
208
|
- lib/mollie/settlement/chargeback.rb
|
207
209
|
- lib/mollie/settlement/payment.rb
|
208
210
|
- lib/mollie/settlement/refund.rb
|
@@ -267,7 +269,7 @@ homepage: https://github.com/mollie/mollie-api-ruby
|
|
267
269
|
licenses:
|
268
270
|
- BSD
|
269
271
|
metadata: {}
|
270
|
-
post_install_message:
|
272
|
+
post_install_message:
|
271
273
|
rdoc_options: []
|
272
274
|
require_paths:
|
273
275
|
- lib
|
@@ -282,62 +284,61 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
282
284
|
- !ruby/object:Gem::Version
|
283
285
|
version: '0'
|
284
286
|
requirements: []
|
285
|
-
|
286
|
-
|
287
|
-
signing_key:
|
287
|
+
rubygems_version: 3.5.10
|
288
|
+
signing_key:
|
288
289
|
specification_version: 4
|
289
290
|
summary: Official Mollie API Client for Ruby
|
290
291
|
test_files:
|
291
292
|
- test/fixtures/captures/get.json
|
292
293
|
- test/fixtures/captures/list.json
|
293
|
-
- test/fixtures/subscriptions/get.json
|
294
|
-
- test/fixtures/subscriptions/get_payments.json
|
295
|
-
- test/fixtures/onboarding/submit.json
|
296
|
-
- test/fixtures/onboarding/me.json
|
297
|
-
- test/fixtures/shipments/get.json
|
298
|
-
- test/fixtures/shipments/create.json
|
299
|
-
- test/fixtures/shipments/update.json
|
300
|
-
- test/fixtures/shipments/list.json
|
301
|
-
- test/fixtures/payments/get.json
|
302
294
|
- test/fixtures/methods/get-includes-pricing.json
|
303
|
-
- test/fixtures/
|
304
|
-
- test/fixtures/
|
305
|
-
- test/fixtures/orders/create_refund.json
|
306
|
-
- test/fixtures/orders/cancel_line_qty.json
|
295
|
+
- test/fixtures/onboarding/me.json
|
296
|
+
- test/fixtures/onboarding/submit.json
|
307
297
|
- test/fixtures/orders/cancel_line.json
|
308
|
-
- test/fixtures/orders/
|
309
|
-
- test/fixtures/orders/refund.json
|
310
|
-
- test/fixtures/orders/list_refunds.json
|
298
|
+
- test/fixtures/orders/cancel_line_qty.json
|
311
299
|
- test/fixtures/orders/create.json
|
312
|
-
- test/fixtures/orders/
|
300
|
+
- test/fixtures/orders/create_refund.json
|
301
|
+
- test/fixtures/orders/get.json
|
313
302
|
- test/fixtures/orders/list.json
|
303
|
+
- test/fixtures/orders/list_refunds.json
|
304
|
+
- test/fixtures/orders/refund.json
|
305
|
+
- test/fixtures/orders/refund_all.json
|
306
|
+
- test/fixtures/orders/update.json
|
307
|
+
- test/fixtures/payments/get.json
|
308
|
+
- test/fixtures/refunds/get.json
|
309
|
+
- test/fixtures/shipments/create.json
|
310
|
+
- test/fixtures/shipments/get.json
|
311
|
+
- test/fixtures/shipments/list.json
|
312
|
+
- test/fixtures/shipments/update.json
|
313
|
+
- test/fixtures/subscriptions/get.json
|
314
|
+
- test/fixtures/subscriptions/get_payments.json
|
314
315
|
- test/helper.rb
|
315
|
-
- test/run-test.rb
|
316
|
-
- test/mollie/list_test.rb
|
317
|
-
- test/mollie/invoice_test.rb
|
318
|
-
- test/mollie/order/shipment_test.rb
|
319
|
-
- test/mollie/order/line_test.rb
|
320
|
-
- test/mollie/payment_test.rb
|
321
316
|
- test/mollie/amount_test.rb
|
322
|
-
- test/mollie/
|
317
|
+
- test/mollie/base_test.rb
|
318
|
+
- test/mollie/chargeback_test.rb
|
319
|
+
- test/mollie/client_test.rb
|
320
|
+
- test/mollie/customer/mandate_test.rb
|
321
|
+
- test/mollie/customer/payment_test.rb
|
322
|
+
- test/mollie/customer/subscription_test.rb
|
323
|
+
- test/mollie/customer_test.rb
|
324
|
+
- test/mollie/invoice_test.rb
|
325
|
+
- test/mollie/list_test.rb
|
326
|
+
- test/mollie/method_test.rb
|
323
327
|
- test/mollie/onboarding_test.rb
|
324
|
-
- test/mollie/
|
325
|
-
- test/mollie/
|
326
|
-
- test/mollie/payment/refund_test.rb
|
327
|
-
- test/mollie/payment/capture_test.rb
|
328
|
-
- test/mollie/payment/chargeback_test.rb
|
328
|
+
- test/mollie/order/line_test.rb
|
329
|
+
- test/mollie/order/shipment_test.rb
|
329
330
|
- test/mollie/order_test.rb
|
330
|
-
- test/mollie/customer_test.rb
|
331
331
|
- test/mollie/organization_test.rb
|
332
|
-
- test/mollie/
|
332
|
+
- test/mollie/payment/capture_test.rb
|
333
|
+
- test/mollie/payment/chargeback_test.rb
|
334
|
+
- test/mollie/payment/refund_test.rb
|
335
|
+
- test/mollie/payment_test.rb
|
336
|
+
- test/mollie/permission_test.rb
|
333
337
|
- test/mollie/profile_test.rb
|
338
|
+
- test/mollie/refund_test.rb
|
339
|
+
- test/mollie/settlement/chargeback_test.rb
|
334
340
|
- test/mollie/settlement/payment_test.rb
|
335
341
|
- test/mollie/settlement/refund_test.rb
|
336
|
-
- test/mollie/
|
337
|
-
- test/mollie/
|
338
|
-
- test/
|
339
|
-
- test/mollie/customer/subscription_test.rb
|
340
|
-
- test/mollie/customer/mandate_test.rb
|
341
|
-
- test/mollie/permission_test.rb
|
342
|
-
- test/mollie/base_test.rb
|
343
|
-
- test/mollie/method_test.rb
|
342
|
+
- test/mollie/settlement_test.rb
|
343
|
+
- test/mollie/util_test.rb
|
344
|
+
- test/run-test.rb
|