stripe 3.8.1 → 3.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e0e126dcbcb1339f0cd72cb6e61ff8bcad95d75d
4
- data.tar.gz: 0eeb0eb4383fca37073ff0270e14effb17776c14
3
+ metadata.gz: d454a76d37a56cc1ac7249b7b1d6130db55fa1fe
4
+ data.tar.gz: fa2a235117656908deb0ea747295ef63ae8b92b9
5
5
  SHA512:
6
- metadata.gz: 6e0bf6d764da6d759fb89e0d69edbffd5155f777f54a83406ddc1857ad7f8c0051aa82d1fd26943065ff2e3b5740a3aa867425255dcdf9cc6bfdb2bcbdf9f64a
7
- data.tar.gz: dbc7388a004fcb332cc7af98c438dd149fd65b142aa4071ddbc626914526629ca2cdacb0aae439d8810ee05e64c4b390cdf5534df14bcff72c638cdbdf0c2d0c
6
+ metadata.gz: 3e34f48148db809fc089c73bdbdec2481135d3c60a9494959563657e5ddfeeed496a771982c0f56b5c97024aa821ff321afabeac33a9da15d4af99d11342c95b
7
+ data.tar.gz: 94c23e01ebcb044b4042fd305345a1d962ccd1d5eb9fa67849941c6e8f4079921b1a3ec770175fd89e50be0b0fa0b4940a12c83b79bf507687f791f5fb3673eb
@@ -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
1
+ 3.8.2
@@ -121,12 +121,11 @@ module Stripe
121
121
  url = api_url(path, api_base)
122
122
 
123
123
  body = nil
124
- query_string = nil
124
+ query_params = nil
125
125
 
126
126
  case method.to_s.downcase.to_sym
127
127
  when :get, :head, :delete
128
- query_string = Util.encode_parameters(params) if params && params.any?
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.query_string = query_string
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
- query_string: context.query_string)
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 :query_string
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
@@ -1,3 +1,3 @@
1
1
  module Stripe
2
- VERSION = "3.8.1".freeze
2
+ VERSION = "3.8.2".freeze
3
3
  end
@@ -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
- :'subscription_items[][plan]' => "gold",
91
- :'subscription_items[][quantity]' => 2,
90
+ subscription_items: [
91
+ { plan: "gold", quantity: "2" },
92
+ ],
92
93
  }
93
94
  assert invoice.is_a?(Stripe::Invoice)
94
95
  end
@@ -176,7 +176,7 @@ module Stripe
176
176
  Util.expects(:log_debug).with("Request details",
177
177
  body: "",
178
178
  idempotency_key: "abc",
179
- query_string: nil)
179
+ query_params: nil)
180
180
 
181
181
  Util.expects(:log_info).with("Response from Stripe API",
182
182
  account: "acct_123",
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.1
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-06 00:00:00.000000000 Z
11
+ date: 2017-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday