mollie-api-ruby 4.1.4 → 4.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/examples/subscriptions/create.rb +2 -1
- data/lib/mollie/customer/subscription.rb +6 -1
- data/lib/mollie/version.rb +1 -1
- data/test/mollie/customer/subscription_test.rb +5 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a76a51853379b4f4113eae5e5695252c908fdc1d88c7f3f4b0dcfe9bee7f930
|
4
|
+
data.tar.gz: b27bbdc0788f1e0757a76ccea1ab0160eab78bc247883b204615ebb6cc43cb5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e479d0b5ec12995aa4f69a9df04aaff486d57b88c242110a873da2f6b660a5263767568060250c1b8daf12b84353c477f6859e3e8dfeacec042e6fcb84aa1507
|
7
|
+
data.tar.gz: a197ced40c9dd1c8bd73eee6e1692e40cf0fdd6930decd732799dcefbacf7009389441171dd1145d8870e840ffb98a8784f2634d648112ed176da118b8cf3ec8
|
data/.travis.yml
CHANGED
@@ -4,5 +4,6 @@ subscription = Mollie::Customer::Subscription.create(
|
|
4
4
|
times: 4,
|
5
5
|
interval: '3 months',
|
6
6
|
description: 'Quarterly payment',
|
7
|
-
|
7
|
+
metadata: { my_field: 'value' },
|
8
|
+
webhook_url: 'https://webshop.example.org/payments/webhook/',
|
8
9
|
)
|
@@ -21,7 +21,8 @@ module Mollie
|
|
21
21
|
:method,
|
22
22
|
:mandate_id,
|
23
23
|
:canceled_at,
|
24
|
-
:webhook_url
|
24
|
+
:webhook_url,
|
25
|
+
:metadata
|
25
26
|
|
26
27
|
def active?
|
27
28
|
status == STATUS_ACTIVE
|
@@ -78,6 +79,10 @@ module Mollie
|
|
78
79
|
def customer(options = {})
|
79
80
|
Customer.get(customer_id, options)
|
80
81
|
end
|
82
|
+
|
83
|
+
def metadata=(metadata)
|
84
|
+
@metadata = OpenStruct.new(metadata) if metadata.is_a?(Hash)
|
85
|
+
end
|
81
86
|
end
|
82
87
|
end
|
83
88
|
end
|
data/lib/mollie/version.rb
CHANGED
@@ -19,7 +19,8 @@ module Mollie
|
|
19
19
|
method: 'creditcard',
|
20
20
|
mandate_id: 'mdt_38HS4fsS',
|
21
21
|
canceled_at: '2016-06-01T12:23:34.0Z',
|
22
|
-
webhook_url: 'https://example.org/payments/webhook'
|
22
|
+
webhook_url: 'https://example.org/payments/webhook',
|
23
|
+
metadata: { my_field: 'value' },
|
23
24
|
}
|
24
25
|
|
25
26
|
subscription = Subscription.new(attributes)
|
@@ -40,6 +41,9 @@ module Mollie
|
|
40
41
|
assert_equal 'mdt_38HS4fsS', subscription.mandate_id
|
41
42
|
assert_equal Time.parse('2016-06-01T12:23:34.0Z'), subscription.canceled_at
|
42
43
|
assert_equal 'https://example.org/payments/webhook', subscription.webhook_url
|
44
|
+
|
45
|
+
assert_equal 'value', subscription.metadata.my_field
|
46
|
+
assert_equal nil, subscription.metadata.non_existing
|
43
47
|
end
|
44
48
|
|
45
49
|
def test_status_active
|
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.1.
|
4
|
+
version: 4.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mollie B.V.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -269,8 +269,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
269
269
|
- !ruby/object:Gem::Version
|
270
270
|
version: '0'
|
271
271
|
requirements: []
|
272
|
-
|
273
|
-
rubygems_version: 2.7.8
|
272
|
+
rubygems_version: 3.0.2
|
274
273
|
signing_key:
|
275
274
|
specification_version: 4
|
276
275
|
summary: Official Mollie API Client for Ruby
|