stripe 5.10.0 → 5.11.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: 19022f91eb90d9ea07a8c4f5774e6b83bb5b95e2c09186797f17ef47c2b8c4f1
4
- data.tar.gz: 7d3559aec5925a016175555e716863fcc461877ab407241ef7d15fe35a3e2f34
3
+ metadata.gz: b4d7991b102059c94edfe2ad2e786cbc20f7272e6a18e4951dfeadadad782178
4
+ data.tar.gz: c89b640616bde6d74cc0548ef5b50caa2d0cba7c27041aff53925c5ec004f4d7
5
5
  SHA512:
6
- metadata.gz: 9a8c10d1db3b74dfa8e05767d08645ec1beecb3f661eaf8a8cb542b8b1a8feecf0b8abf6428e0e2638eab2f832963391e59f74e8dfadb16ca3933ccdb5484185
7
- data.tar.gz: 26252c2b115465fa0e13bd2618b3bf719eb5b697576ccd5ec6e42767d4c95e75e9ac68a7b75c3face62d8a73436a0ff5b97f733f08745d68afc069f2e0c8f5f4
6
+ metadata.gz: 5bcbc102d23e255b3d262e1c0a765109de3e59be680a6a07fc08b28c799323e2b3f302148b7507c65bac7b2ed965c27c4a0074afc6d7c863f340738e012c2709
7
+ data.tar.gz: e45905f9230f742137e78a03b63181a6d93b8190b71db615fd875359acd93630b9ad5a7ec003afc090f35e53a94cd1c1a5fbbf8e7db42a5999cbaf0ac8ea9c1b
@@ -16,7 +16,7 @@ sudo: false
16
16
  env:
17
17
  global:
18
18
  # If changing this number, please also change it in `test/test_helper.rb`.
19
- - STRIPE_MOCK_VERSION=0.72.0
19
+ - STRIPE_MOCK_VERSION=0.76.0
20
20
 
21
21
  cache:
22
22
  directories:
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.11.0 - 2019-11-26
4
+ * [#885](https://github.com/stripe/stripe-ruby/pull/885) Add support for `CreditNote` preview
5
+
3
6
  ## 5.10.0 - 2019-11-08
4
7
  * [#882](https://github.com/stripe/stripe-ruby/pull/882) Add list_usage_record_summaries and list_source_transactions
5
8
 
data/README.md CHANGED
@@ -194,7 +194,7 @@ retries are safe.
194
194
  Open and read timeouts are configurable:
195
195
 
196
196
  ```ruby
197
- Stripe.open_timeout = 30 // in seconds
197
+ Stripe.open_timeout = 30 # in seconds
198
198
  Stripe.read_timeout = 80
199
199
  ```
200
200
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.10.0
1
+ 5.11.0
@@ -18,5 +18,10 @@ module Stripe
18
18
  opts: opts
19
19
  )
20
20
  end
21
+
22
+ def self.preview(params, opts = {})
23
+ resp, opts = request(:get, resource_url + "/preview", params, opts)
24
+ Util.convert_to_stripe_object(resp.data, opts)
25
+ end
21
26
  end
22
27
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "5.10.0"
4
+ VERSION = "5.11.0"
5
5
  end
@@ -40,6 +40,21 @@ module Stripe
40
40
  assert credit_note.is_a?(Stripe::CreditNote)
41
41
  end
42
42
 
43
+ context ".preview" do
44
+ should "preview a credit note" do
45
+ invoice = Stripe::CreditNote.preview(
46
+ invoice: "in_123",
47
+ amount: 500
48
+ )
49
+ assert_requested :get, "#{Stripe.api_base}/v1/credit_notes/preview",
50
+ query: {
51
+ invoice: "in_123",
52
+ amount: 500,
53
+ }
54
+ assert invoice.is_a?(Stripe::CreditNote)
55
+ end
56
+ end
57
+
43
58
  context "#void_credit_note" do
44
59
  should "void credit_note" do
45
60
  credit_note = Stripe::CreditNote.retrieve("cn_123")
@@ -16,7 +16,7 @@ require ::File.expand_path("test_data", __dir__)
16
16
  require ::File.expand_path("stripe_mock", __dir__)
17
17
 
18
18
  # If changing this number, please also change it in `.travis.yml`.
19
- MOCK_MINIMUM_VERSION = "0.72.0"
19
+ MOCK_MINIMUM_VERSION = "0.76.0"
20
20
  MOCK_PORT = Stripe::StripeMock.start
21
21
 
22
22
  # Disable all real network connections except those that are outgoing to
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: 5.10.0
4
+ version: 5.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-09 00:00:00.000000000 Z
11
+ date: 2019-11-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Stripe is the easiest way to accept payments online. See https://stripe.com
14
14
  for details.