stripe 3.24.0 → 3.25.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
  SHA1:
3
- metadata.gz: 3ae3f4028cea6f414ae6fd23383e5bb6c3e6472f
4
- data.tar.gz: 220803e2c91675a87d15fda1e3d273395e6ad19d
3
+ metadata.gz: e2d4d141ec66cb9beab468b302cdada29e1f25e6
4
+ data.tar.gz: 7af7d595684b5835a87a8a2afa61d2bfd1787688
5
5
  SHA512:
6
- metadata.gz: 206f959fe462ac3c24ea4c521b0f2ea47d135e01ead0ca54c1ec4627410f6945b08db459f28789afe5db3a63ae42b19a8522ffdfd64e53e7c7d9eef89d789de3
7
- data.tar.gz: c8295624bbd07e89c860f9c28cb1e7f013232125fe13e3f4c89db7fe193600dfe61baf77b131b6d53900063e9ca5d02dc25822470160c5a872c401da30b9c43a
6
+ metadata.gz: fe9bf29dac7ba00f2d8cbd3cac21966d160816a8f6fc388f0f95aab5fb60bb4037f0378409059aefc891fd19bfe11ab2134c3d3ef585938b8c3cc5b6db77981a
7
+ data.tar.gz: 9398a3c55ef85e4293abbeee7b3398f55c9a424eb12e0cd1a3fcea1f06bac7bf351b206b44acf84e5154f8fd1b0940ab99e93749f49368f9478b8b01b06fe6b2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.25.0 - 2018-08-28
4
+ * [#678](https://github.com/stripe/stripe-ruby/pull/678) Allow payment intent `#cancel`, `#capture`, and `#confirm` to take their own parameters
5
+
3
6
  ## 3.24.0 - 2018-08-27
4
7
  * [#675](https://github.com/stripe/stripe-ruby/pull/675) Remove support for `BitcoinReceiver` write-actions
5
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.24.0
1
+ 3.25.0
@@ -3,25 +3,24 @@
3
3
  module Stripe
4
4
  class PaymentIntent < APIResource
5
5
  extend Stripe::APIOperations::Create
6
- include Stripe::APIOperations::Delete
7
6
  extend Stripe::APIOperations::List
8
7
  include Stripe::APIOperations::Save
9
8
 
10
9
  OBJECT_NAME = "payment_intent".freeze
11
10
 
12
- def cancel
13
- resp, api_key = request(:post, resource_url + "/cancel")
14
- initialize_from(resp.data, api_key)
11
+ def cancel(params = {}, opts = {})
12
+ resp, opts = request(:post, resource_url + "/cancel", params, opts)
13
+ initialize_from(resp.data, opts)
15
14
  end
16
15
 
17
- def capture
18
- resp, api_key = request(:post, resource_url + "/capture")
19
- initialize_from(resp.data, api_key)
16
+ def capture(params = {}, opts = {})
17
+ resp, opts = request(:post, resource_url + "/capture", params, opts)
18
+ initialize_from(resp.data, opts)
20
19
  end
21
20
 
22
- def confirm
23
- resp, api_key = request(:post, resource_url + "/confirm")
24
- initialize_from(resp.data, api_key)
21
+ def confirm(params = {}, opts = {})
22
+ resp, opts = request(:post, resource_url + "/confirm", params, opts)
23
+ initialize_from(resp.data, opts)
25
24
  end
26
25
  end
27
26
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "3.24.0".freeze
4
+ VERSION = "3.25.0".freeze
5
5
  end
@@ -56,7 +56,9 @@ module Stripe
56
56
  context "#capture" do
57
57
  should "capture a payment_intent" do
58
58
  payment_intent = Stripe::PaymentIntent.construct_from(id: "pi_123", object: "payment_intent")
59
- payment_intent = payment_intent.capture
59
+ payment_intent = payment_intent.capture(
60
+ amount_to_capture: 1234
61
+ )
60
62
 
61
63
  assert_requested :post, "#{Stripe.api_base}/v1/payment_intents/pi_123/capture"
62
64
  assert payment_intent.is_a?(Stripe::PaymentIntent)
@@ -66,7 +68,9 @@ module Stripe
66
68
  context "#confirm" do
67
69
  should "confirm a payment_intent" do
68
70
  payment_intent = Stripe::PaymentIntent.construct_from(id: "pi_123", object: "payment_intent")
69
- payment_intent = payment_intent.confirm
71
+ payment_intent = payment_intent.confirm(
72
+ source: "src_123"
73
+ )
70
74
 
71
75
  assert_requested :post, "#{Stripe.api_base}/v1/payment_intents/pi_123/confirm"
72
76
  assert payment_intent.is_a?(Stripe::PaymentIntent)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.24.0
4
+ version: 3.25.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-27 00:00:00.000000000 Z
11
+ date: 2018-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -207,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
207
  version: '0'
208
208
  requirements: []
209
209
  rubyforge_project:
210
- rubygems_version: 2.6.11
210
+ rubygems_version: 2.6.14
211
211
  signing_key:
212
212
  specification_version: 4
213
213
  summary: Ruby bindings for the Stripe API