stripe 3.8.1 → 3.8.2
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/VERSION +1 -1
- data/lib/stripe/stripe_client.rb +6 -6
- data/lib/stripe/version.rb +1 -1
- data/test/stripe/invoice_test.rb +3 -2
- data/test/stripe/stripe_client_test.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d454a76d37a56cc1ac7249b7b1d6130db55fa1fe
|
4
|
+
data.tar.gz: fa2a235117656908deb0ea747295ef63ae8b92b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e34f48148db809fc089c73bdbdec2481135d3c60a9494959563657e5ddfeeed496a771982c0f56b5c97024aa821ff321afabeac33a9da15d4af99d11342c95b
|
7
|
+
data.tar.gz: 94c23e01ebcb044b4042fd305345a1d962ccd1d5eb9fa67849941c6e8f4079921b1a3ec770175fd89e50be0b0fa0b4940a12c83b79bf507687f791f5fb3673eb
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 3.8.2 - 2017-12-07
|
4
|
+
* [#612](https://github.com/stripe/stripe-ruby/pull/612) Fix integer-indexed array encoding when sent as query parameter (subscription items can now be used when fetching an upcoming invoice)
|
5
|
+
|
3
6
|
## 3.8.1 - 2017-12-06
|
4
7
|
* [#611](https://github.com/stripe/stripe-ruby/pull/611) Support `Tempfile` (as well as `File`) in file uploads
|
5
8
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.8.
|
1
|
+
3.8.2
|
data/lib/stripe/stripe_client.rb
CHANGED
@@ -121,12 +121,11 @@ module Stripe
|
|
121
121
|
url = api_url(path, api_base)
|
122
122
|
|
123
123
|
body = nil
|
124
|
-
|
124
|
+
query_params = nil
|
125
125
|
|
126
126
|
case method.to_s.downcase.to_sym
|
127
127
|
when :get, :head, :delete
|
128
|
-
|
129
|
-
url += "#{URI.parse(url).query ? '&' : '?'}#{query_string}" unless query_string.nil?
|
128
|
+
query_params = params
|
130
129
|
else
|
131
130
|
body = if headers[:content_type] && headers[:content_type] == "multipart/form-data"
|
132
131
|
params
|
@@ -148,12 +147,13 @@ module Stripe
|
|
148
147
|
context.idempotency_key = headers["Idempotency-Key"]
|
149
148
|
context.method = method
|
150
149
|
context.path = path
|
151
|
-
context.
|
150
|
+
context.query_params = query_params ? Util.encode_parameters(query_params) : nil
|
152
151
|
|
153
152
|
http_resp = execute_request_with_rescues(api_base, context) do
|
154
153
|
conn.run_request(method, url, body, headers) do |req|
|
155
154
|
req.options.open_timeout = Stripe.open_timeout
|
156
155
|
req.options.timeout = Stripe.read_timeout
|
156
|
+
req.params = query_params unless query_params.nil?
|
157
157
|
end
|
158
158
|
end
|
159
159
|
|
@@ -443,7 +443,7 @@ module Stripe
|
|
443
443
|
Util.log_debug("Request details",
|
444
444
|
body: context.body,
|
445
445
|
idempotency_key: context.idempotency_key,
|
446
|
-
|
446
|
+
query_params: context.query_params)
|
447
447
|
end
|
448
448
|
private :log_request
|
449
449
|
|
@@ -492,7 +492,7 @@ module Stripe
|
|
492
492
|
attr_accessor :idempotency_key
|
493
493
|
attr_accessor :method
|
494
494
|
attr_accessor :path
|
495
|
-
attr_accessor :
|
495
|
+
attr_accessor :query_params
|
496
496
|
attr_accessor :request_id
|
497
497
|
|
498
498
|
# The idea with this method is that we might want to update some of
|
data/lib/stripe/version.rb
CHANGED
data/test/stripe/invoice_test.rb
CHANGED
@@ -87,8 +87,9 @@ module Stripe
|
|
87
87
|
assert_requested :get, "#{Stripe.api_base}/v1/invoices/upcoming",
|
88
88
|
query: {
|
89
89
|
customer: "cus_123",
|
90
|
-
:
|
91
|
-
|
90
|
+
subscription_items: [
|
91
|
+
{ plan: "gold", quantity: "2" },
|
92
|
+
],
|
92
93
|
}
|
93
94
|
assert invoice.is_a?(Stripe::Invoice)
|
94
95
|
end
|
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.8.
|
4
|
+
version: 3.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|