stripe 3.20.0 → 3.21.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: b8ce3302551b0366a5fa332ffa1d5a6a8fcddee860deadbdfbc3c97e97a13cdc
4
- data.tar.gz: 1f9f744430ed5948fab2fe8bece1e63d9fa3c9d3449764cf477afc04952e7fba
3
+ metadata.gz: 7446a7ffbe62bac932c54e27e6c5ee8f227969af2cfa02888ec4c28dc2a214d8
4
+ data.tar.gz: 7906ea442c3276d124e899dea704c3b3baaccc50c6d4379b4c96cf1ce11a9b10
5
5
  SHA512:
6
- metadata.gz: 6e28a1d16c743140d1716d9666a6098d76606a7f6b1a2f87c977cab55261850efae02e84f72d29495c96b0490904d5e96e643bb6de570518a3ea107332600680
7
- data.tar.gz: f14c519344d45df88b5d2ac2dd3f4d8462b203da878a166917edb29a342de88c7ff653b8087f57b106d15496b98eb5cbbf03d802e82011f4cdc0a5d964004a29
6
+ metadata.gz: 12f3db7c0acee86be47c3ea8db67d91e8a3b1e5bdf57332ebe3c8f3903ed4a6c2560acc4ec2b9f544b34d9c0f2b781257bb342127e8449ed946e7f7f1927ca9e
7
+ data.tar.gz: 4fd4cdbf47440515531c3981ed76fc48730322ab93776b3c185ae45e8760441c97eaa55f5a6e05e0ce3aa1ad07c57343d0cf3ff2ec8b2d75d6a652ebf0fd9d20
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.21.0 - 2018-08-03
4
+ * [#671](https://github.com/stripe/stripe-ruby/pull/671) Add cancel support for topups
5
+
3
6
  ## 3.20.0 - 2018-08-03
4
7
  * [#669](https://github.com/stripe/stripe-ruby/pull/669) Add support for file links
5
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.20.0
1
+ 3.21.0
@@ -7,5 +7,10 @@ module Stripe
7
7
  include Stripe::APIOperations::Save
8
8
 
9
9
  OBJECT_NAME = "topup".freeze
10
+
11
+ def cancel
12
+ resp, api_key = request(:post, resource_url + "/cancel")
13
+ initialize_from(resp.data, api_key)
14
+ end
10
15
  end
11
16
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "3.20.0".freeze
4
+ VERSION = "3.21.0".freeze
5
5
  end
@@ -41,5 +41,14 @@ module Stripe
41
41
  assert_requested :post, "#{Stripe.api_base}/v1/topups/tu_123"
42
42
  assert topup.is_a?(Stripe::Topup)
43
43
  end
44
+
45
+ context "#cancel" do
46
+ should "cancel the topup" do
47
+ topup = Stripe::Topup.retrieve("tu_123")
48
+ topup = topup.cancel
49
+ assert_requested :post, "#{Stripe.api_base}/v1/topups/#{topup.id}/cancel"
50
+ assert topup.is_a?(Stripe::Topup)
51
+ end
52
+ end
44
53
  end
45
54
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.20.0
4
+ version: 3.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe