mollie-api-ruby 4.16.0 → 4.17.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c69f3ca558a810762900aa7a74798129377ee91d41b136d5b32428085451d8f
4
- data.tar.gz: cde2ea24aa5eeae5218d71af093b7081e9dbcdd5f94dd9b84bb7f9cef9d841de
3
+ metadata.gz: 2cecda0428cc1ec88b912368395adf92608fdb85e92f642e95373cd8cdb6399d
4
+ data.tar.gz: a0ca1de61ed2079f318a58ac70a80f379bde66ef17a90f69836aa387c68326df
5
5
  SHA512:
6
- metadata.gz: 25f7c4a575b44e5ce96a8842fdb9c95f817f0beb0ab7150d221394a2b6c906921d538a8a398e6aab6f0569e772ef589fbdb6c75f51d6caa02ad9e95b6e313987
7
- data.tar.gz: 27d0e5486b0e3c18f6e69eadc606aaaa75a32bd851780a3bebfbbd2f7952193743cfd3c2c7a133cd553292bfe561ca99727717bb710b62eba679d48576a8a49c
6
+ metadata.gz: 1d957aeb32e7653adbde02ec1c8c840e94c70e7fe2c467b5c37d58e14323a14f17c37149b7bf6d136e49045f6c8ab094554fdc1a153347bffeea47e2ea2a69d9
7
+ data.tar.gz: 978df1487eb575b7dd289928996e1d6d474d6a4cd6eb8e9a0099d831cdadec1da95fdab7a70921a53c27773b7eb277f47339ff6b95f00869e9120f1055ab17f0
data/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  All notable changes to this project will be documented in this file.
6
6
 
7
+ ## 4.17.0 - 2025-04-21
8
+
9
+ - (bc414d0) Payment: add release payment authorization API
10
+
7
11
  ## 4.16.0 - 2025-03-19
8
12
 
9
13
  - (9caf303) Support embedded payment captures and chargebacks
data/lib/mollie/client.rb CHANGED
@@ -126,6 +126,8 @@ module Mollie
126
126
  case http_code
127
127
  when 200, 201
128
128
  Util.nested_underscore_keys(JSON.parse(response.body))
129
+ when 202
130
+ JSON.parse(response.body)
129
131
  when 204
130
132
  {} # No Content
131
133
  when 404
@@ -196,6 +196,10 @@ module Mollie
196
196
  Payment::Refund.create(options)
197
197
  end
198
198
 
199
+ def release_authorization(options = {})
200
+ Client.instance.perform_http_call("POST", "payments/#{id}", "release-authorization", {}, options) == {}
201
+ end
202
+
199
203
  def refunds(options = {})
200
204
  resources = (attributes['_embedded']['refunds'] if attributes['_embedded'])
201
205
 
@@ -1,3 +1,3 @@
1
1
  module Mollie
2
- VERSION = '4.16.0'.freeze
2
+ VERSION = '4.17.0'.freeze
3
3
  end
@@ -151,6 +151,22 @@ module Mollie
151
151
  assert_equal 'cst_8wmqcHMN4U', payment.customer_id
152
152
  end
153
153
 
154
+ def test_release_authorization
155
+ stub_request(:get, 'https://api.mollie.com/v2/payments/tr_WDqYK6vllg')
156
+ .to_return(status: 200, body: %(
157
+ {
158
+ "resource": "payment",
159
+ "id": "tr_WDqYK6vllg"
160
+ }
161
+ ), headers: {})
162
+
163
+ stub_request(:post, 'https://api.mollie.com/v2/payments/tr_WDqYK6vllg/release-authorization')
164
+ .to_return(status: 202, body: %({}), headers: {})
165
+
166
+ payment = Payment.get('tr_WDqYK6vllg')
167
+ assert payment.release_authorization
168
+ end
169
+
154
170
  def test_refund!
155
171
  stub_request(:get, 'https://api.mollie.com/v2/payments/tr_WDqYK6vllg')
156
172
  .to_return(status: 200, body: %(
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mollie-api-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.16.0
4
+ version: 4.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mollie B.V.
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-19 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: ostruct
@@ -369,7 +369,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
369
369
  - !ruby/object:Gem::Version
370
370
  version: '0'
371
371
  requirements: []
372
- rubygems_version: 3.6.2
372
+ rubygems_version: 3.6.7
373
373
  specification_version: 4
374
374
  summary: Official Mollie API Client for Ruby
375
375
  test_files: