mollie-api-ruby 4.1.4 → 4.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6f125ca476cb3699da5c62e7163344547f81c4155e1a58dceda15fe120cdadb
4
- data.tar.gz: c046760f5fb6858d1ee673a550fcc0f76181f8e83c3b0f3eeb028098f2920c8a
3
+ metadata.gz: 1a76a51853379b4f4113eae5e5695252c908fdc1d88c7f3f4b0dcfe9bee7f930
4
+ data.tar.gz: b27bbdc0788f1e0757a76ccea1ab0160eab78bc247883b204615ebb6cc43cb5e
5
5
  SHA512:
6
- metadata.gz: 88762dfc9dbedce90894e74227fcac14458045557b462bd59765093cab594f8979af1cfba15d13e3bcd9b399c739df9d8ceba0a5e487d40fa3f4e064fbb35c64
7
- data.tar.gz: 5f30fa23638fd97751fce89fbed0e93af28a8e6359630e8f408bc06ec3aa0ec5135f986e94dab4067c6f818a2194ff2839b21dade5e828d3319ce4db1898eda1
6
+ metadata.gz: e479d0b5ec12995aa4f69a9df04aaff486d57b88c242110a873da2f6b660a5263767568060250c1b8daf12b84353c477f6859e3e8dfeacec042e6fcb84aa1507
7
+ data.tar.gz: a197ced40c9dd1c8bd73eee6e1692e40cf0fdd6930decd732799dcefbacf7009389441171dd1145d8870e840ffb98a8784f2634d648112ed176da118b8cf3ec8
data/.travis.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  language: ruby
2
- before_install: gem install bundler
2
+ before_install: gem install bundler -v 1.17.3
3
3
  rvm:
4
4
  - 2.1
5
5
  - 2.2
@@ -4,5 +4,6 @@ subscription = Mollie::Customer::Subscription.create(
4
4
  times: 4,
5
5
  interval: '3 months',
6
6
  description: 'Quarterly payment',
7
- webhook_url: 'https://webshop.example.org/payments/webhook/'
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
@@ -1,3 +1,3 @@
1
1
  module Mollie
2
- VERSION = '4.1.4'.freeze
2
+ VERSION = '4.1.5'.freeze
3
3
  end
@@ -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
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: 2018-12-04 00:00:00.000000000 Z
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
- rubyforge_project:
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