stripe 3.22.0 → 3.23.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +1 -1
- data/CHANGELOG.md +3 -0
- data/VERSION +1 -1
- data/lib/stripe.rb +1 -0
- data/lib/stripe/subscription_item.rb +5 -0
- data/lib/stripe/usage_record_summary.rb +7 -0
- data/lib/stripe/util.rb +1 -0
- data/lib/stripe/version.rb +1 -1
- data/test/stripe/usage_record_summary_test.rb +19 -0
- data/test/test_helper.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b72ba017e53f1ce4d5421b86d2f4f061b24e5c3db066198d822a4ccd613f20c3
|
4
|
+
data.tar.gz: 91b5e733079469a1e15ab26ecc3524ac04d01661682121eb24dc8296b99e66e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2823396ffb1a8afe9c1531fa9ea1b2d02638c2eedfc78d51cf846adec44bba12a587d756271c08424855c85b6ff9ff2af8666721788ab988339889d0b3f5b2d1
|
7
|
+
data.tar.gz: 9f5a2b11eb8d5c30149001430092411ff830f8dc5b0fd3dad2c3ec064fdc035ecb0c2774e8dbd2b33b05fbfb437049a0af34b79a92095cfd8ee09a4ae681be97
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 3.23.0 - 2018-08-23
|
4
|
+
* [#676](https://github.com/stripe/stripe-ruby/pull/676) Add support for usage record summaries
|
5
|
+
|
3
6
|
## 3.22.0 - 2018-08-15
|
4
7
|
* [#674](https://github.com/stripe/stripe-ruby/pull/674) Use integer-indexed encoding for all arrays
|
5
8
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.23.0
|
data/lib/stripe.rb
CHANGED
@@ -8,5 +8,10 @@ module Stripe
|
|
8
8
|
include Stripe::APIOperations::Save
|
9
9
|
|
10
10
|
OBJECT_NAME = "subscription_item".freeze
|
11
|
+
|
12
|
+
def usage_record_summaries(params = {}, opts = {})
|
13
|
+
resp, opts = request(:get, resource_url + "/usage_record_summaries", params, Util.normalize_opts(opts))
|
14
|
+
Util.convert_to_stripe_object(resp.data, opts)
|
15
|
+
end
|
11
16
|
end
|
12
17
|
end
|
data/lib/stripe/util.rb
CHANGED
data/lib/stripe/version.rb
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require File.expand_path("../../test_helper", __FILE__)
|
4
|
+
|
5
|
+
module Stripe
|
6
|
+
class UsageRecordSummaryTest < Test::Unit::TestCase
|
7
|
+
setup do
|
8
|
+
@sub_item = Stripe::SubscriptionItem.retrieve("si_123")
|
9
|
+
end
|
10
|
+
|
11
|
+
should "be listable" do
|
12
|
+
transactions = @sub_item.usage_record_summaries
|
13
|
+
|
14
|
+
assert_requested :get, "#{Stripe.api_base}/v1/subscription_items/#{@sub_item.id}/usage_record_summaries"
|
15
|
+
assert transactions.data.is_a?(Array)
|
16
|
+
assert transactions.first.is_a?(Stripe::UsageRecordSummary)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -16,7 +16,7 @@ PROJECT_ROOT = File.expand_path("../../", __FILE__)
|
|
16
16
|
require File.expand_path("../test_data", __FILE__)
|
17
17
|
|
18
18
|
# If changing this number, please also change it in `.travis.yml`.
|
19
|
-
MOCK_MINIMUM_VERSION = "0.
|
19
|
+
MOCK_MINIMUM_VERSION = "0.26.0".freeze
|
20
20
|
MOCK_PORT = ENV["STRIPE_MOCK_PORT"] || 12_111
|
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: 3.
|
4
|
+
version: 3.23.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-
|
11
|
+
date: 2018-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -116,6 +116,7 @@ files:
|
|
116
116
|
- lib/stripe/topup.rb
|
117
117
|
- lib/stripe/transfer.rb
|
118
118
|
- lib/stripe/usage_record.rb
|
119
|
+
- lib/stripe/usage_record_summary.rb
|
119
120
|
- lib/stripe/util.rb
|
120
121
|
- lib/stripe/version.rb
|
121
122
|
- lib/stripe/webhook.rb
|
@@ -179,6 +180,7 @@ files:
|
|
179
180
|
- test/stripe/topup_test.rb
|
180
181
|
- test/stripe/transfer_reversals_operations_test.rb
|
181
182
|
- test/stripe/transfer_test.rb
|
183
|
+
- test/stripe/usage_record_summary_test.rb
|
182
184
|
- test/stripe/usage_record_test.rb
|
183
185
|
- test/stripe/util_test.rb
|
184
186
|
- test/stripe/webhook_test.rb
|
@@ -205,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
207
|
version: '0'
|
206
208
|
requirements: []
|
207
209
|
rubyforge_project:
|
208
|
-
rubygems_version: 2.
|
210
|
+
rubygems_version: 2.7.7
|
209
211
|
signing_key:
|
210
212
|
specification_version: 4
|
211
213
|
summary: Ruby bindings for the Stripe API
|
@@ -269,6 +271,7 @@ test_files:
|
|
269
271
|
- test/stripe/topup_test.rb
|
270
272
|
- test/stripe/transfer_reversals_operations_test.rb
|
271
273
|
- test/stripe/transfer_test.rb
|
274
|
+
- test/stripe/usage_record_summary_test.rb
|
272
275
|
- test/stripe/usage_record_test.rb
|
273
276
|
- test/stripe/util_test.rb
|
274
277
|
- test/stripe/webhook_test.rb
|