stripe 4.23.0 → 4.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/VERSION +1 -1
- data/lib/stripe/resources/subscription_item.rb +3 -0
- data/lib/stripe/resources/subscription_schedule.rb +0 -5
- data/lib/stripe/version.rb +1 -1
- data/test/stripe/subscription_item_test.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2abaedad94afb640e2ee4b39c6a825a2aa8f234d8ce5d64542d73cae0c46c92
|
4
|
+
data.tar.gz: c5c0f7c81270700f7abbf8adcf329268daaff092c8c4892c500ff06c6a1e2dc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f3955ca4759861c3f5d2bd6c78d661239886e44d3cf25939185dc0cc1846ded39c19c71f15c1c71295d686d2cab2d3b5937c11cf0dc9364dbca9289718f02b7
|
7
|
+
data.tar.gz: 9d3d78053ccb35930ebf2cb7da3b4fe986e357599d53fe685b63f79799e26707354eac68b8ce70b0958ddce0375865f67158c1c843c7bd74d28f4b8f8fd3a56c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 4.24.0 - 2019-08-12
|
4
|
+
* [#825](https://github.com/stripe/stripe-ruby/pull/825) Add `SubscriptionItem.create_usage_record` method
|
5
|
+
- This release also removed the `SubscriptionSchedule.revisions` method. This should have been included in the previous release (4.23.0)
|
6
|
+
|
3
7
|
## 4.23.0 - 2019-08-09
|
4
8
|
* [#824](https://github.com/stripe/stripe-ruby/pull/824) Remove SubscriptionScheduleRevision
|
5
9
|
- This is technically a breaking change. We've chosen to release it as a minor vesion bump because the associated API is unused.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.
|
1
|
+
4.24.0
|
@@ -6,9 +6,12 @@ module Stripe
|
|
6
6
|
include Stripe::APIOperations::Delete
|
7
7
|
extend Stripe::APIOperations::List
|
8
8
|
include Stripe::APIOperations::Save
|
9
|
+
extend Stripe::APIOperations::NestedResource
|
9
10
|
|
10
11
|
OBJECT_NAME = "subscription_item".freeze
|
11
12
|
|
13
|
+
nested_resource_class_methods :usage_record, operations: %i[create]
|
14
|
+
|
12
15
|
def usage_record_summaries(params = {}, opts = {})
|
13
16
|
resp, opts = request(:get, resource_url + "/usage_record_summaries", params, opts)
|
14
17
|
Util.convert_to_stripe_object(resp.data, opts)
|
data/lib/stripe/version.rb
CHANGED
@@ -59,5 +59,17 @@ module Stripe
|
|
59
59
|
assert item.is_a?(Stripe::SubscriptionItem)
|
60
60
|
end
|
61
61
|
end
|
62
|
+
|
63
|
+
context "#create_usage_record" do
|
64
|
+
should "create a usage record" do
|
65
|
+
Stripe::SubscriptionItem.create_usage_record(
|
66
|
+
"si_123",
|
67
|
+
quantity: 5000,
|
68
|
+
timestamp: Time.now.to_i,
|
69
|
+
action: "increment"
|
70
|
+
)
|
71
|
+
assert_requested :post, "#{Stripe.api_base}/v1/subscription_items/si_123/usage_records"
|
72
|
+
end
|
73
|
+
end
|
62
74
|
end
|
63
75
|
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: 4.
|
4
|
+
version: 4.24.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-08-
|
11
|
+
date: 2019-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|