stripe 5.9.0 → 5.10.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 +4 -4
- data/CHANGELOG.md +20 -17
- data/VERSION +1 -1
- data/lib/stripe/resources/source.rb +5 -0
- data/lib/stripe/resources/subscription_item.rb +5 -0
- data/lib/stripe/version.rb +1 -1
- data/test/stripe/source_transaction_test.rb +9 -1
- data/test/stripe/subscription_item_test.rb +9 -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: 19022f91eb90d9ea07a8c4f5774e6b83bb5b95e2c09186797f17ef47c2b8c4f1
|
|
4
|
+
data.tar.gz: 7d3559aec5925a016175555e716863fcc461877ab407241ef7d15fe35a3e2f34
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9a8c10d1db3b74dfa8e05767d08645ec1beecb3f661eaf8a8cb542b8b1a8feecf0b8abf6428e0e2638eab2f832963391e59f74e8dfadb16ca3933ccdb5484185
|
|
7
|
+
data.tar.gz: 26252c2b115465fa0e13bd2618b3bf719eb5b697576ccd5ec6e42767d4c95e75e9ac68a7b75c3face62d8a73436a0ff5b97f733f08745d68afc069f2e0c8f5f4
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.10.0 - 2019-11-08
|
|
4
|
+
* [#882](https://github.com/stripe/stripe-ruby/pull/882) Add list_usage_record_summaries and list_source_transactions
|
|
5
|
+
|
|
3
6
|
## 5.9.0 - 2019-11-07
|
|
4
7
|
* [#870](https://github.com/stripe/stripe-ruby/pull/870) Add request instrumentation callback (see `README.md` for usage example)
|
|
5
8
|
|
|
@@ -46,23 +49,23 @@
|
|
|
46
49
|
Major version release. The [migration guide](https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v5) contains a detailed list of backwards-incompatible changes with upgrade instructions.
|
|
47
50
|
|
|
48
51
|
Pull requests included in this release (cf. [#815](https://github.com/stripe/stripe-ruby/pull/815)) (⚠️ = breaking changes):
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* [
|
|
53
|
-
* [
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* [
|
|
59
|
-
* [
|
|
60
|
-
* [
|
|
61
|
-
* [
|
|
62
|
-
* [
|
|
63
|
-
* [
|
|
64
|
-
* [
|
|
65
|
-
* [
|
|
52
|
+
* ⚠️ [#813](https://github.com/stripe/stripe-ruby/pull/813): Convert library to use built-in `Net::HTTP`
|
|
53
|
+
* ⚠️ [#816](https://github.com/stripe/stripe-ruby/pull/816): Make `code` argument in `CardError` named instead of positional.
|
|
54
|
+
* ⚠️ [#817](https://github.com/stripe/stripe-ruby/pull/817): Drop support for very old Ruby versions.
|
|
55
|
+
* [#818](https://github.com/stripe/stripe-ruby/pull/818): Bump Rubocop to latest version
|
|
56
|
+
* [#819](https://github.com/stripe/stripe-ruby/pull/819): Ruby minimum version increase followup
|
|
57
|
+
* ⚠️ [#820](https://github.com/stripe/stripe-ruby/pull/820): Remove old deprecated methods
|
|
58
|
+
* ⚠️ [#823](https://github.com/stripe/stripe-ruby/pull/823): Remove all alias for list methods
|
|
59
|
+
* ⚠️ [#826](https://github.com/stripe/stripe-ruby/pull/826): Remove `UsageRecord.create` method
|
|
60
|
+
* ⚠️ [#827](https://github.com/stripe/stripe-ruby/pull/827): Remove `IssuerFraudRecord`
|
|
61
|
+
* [#811](https://github.com/stripe/stripe-ruby/pull/811): Add `ErrorObject` to `StripeError` exceptions
|
|
62
|
+
* [#828](https://github.com/stripe/stripe-ruby/pull/828): Tweak retry logic to be a little more like stripe-node
|
|
63
|
+
* [#829](https://github.com/stripe/stripe-ruby/pull/829): Reset connections when connection-changing configuration changes (optional)
|
|
64
|
+
* [#830](https://github.com/stripe/stripe-ruby/pull/830): Fix inverted sign for 500 retries
|
|
65
|
+
* ⚠️[#831](https://github.com/stripe/stripe-ruby/pull/831): Remove a few more very old deprecated methods
|
|
66
|
+
* [#832](https://github.com/stripe/stripe-ruby/pull/832): Minor cleanup in `StripeClient`
|
|
67
|
+
* [#833](https://github.com/stripe/stripe-ruby/pull/833): Do better bookkeeping when tracking state in `Thread.current`
|
|
68
|
+
* [#834](https://github.com/stripe/stripe-ruby/pull/834): Add `Invoice.list_upcoming_line_items` method
|
|
66
69
|
|
|
67
70
|
## 4.24.0 - 2019-08-12
|
|
68
71
|
* [#825](https://github.com/stripe/stripe-ruby/pull/825) Add `SubscriptionItem.create_usage_record` method
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.
|
|
1
|
+
5.10.0
|
|
@@ -4,11 +4,14 @@ module Stripe
|
|
|
4
4
|
class Source < APIResource
|
|
5
5
|
extend Stripe::APIOperations::Create
|
|
6
6
|
include Stripe::APIOperations::Save
|
|
7
|
+
extend Stripe::APIOperations::NestedResource
|
|
7
8
|
|
|
8
9
|
OBJECT_NAME = "source"
|
|
9
10
|
|
|
10
11
|
custom_method :verify, http_verb: :post
|
|
11
12
|
|
|
13
|
+
nested_resource_class_methods :source_transaction, operations: %i[list]
|
|
14
|
+
|
|
12
15
|
def verify(params = {}, opts = {})
|
|
13
16
|
request_stripe_object(
|
|
14
17
|
method: :post,
|
|
@@ -36,5 +39,7 @@ module Stripe
|
|
|
36
39
|
opts)
|
|
37
40
|
Util.convert_to_stripe_object(resp.data, opts)
|
|
38
41
|
end
|
|
42
|
+
extend Gem::Deprecate
|
|
43
|
+
deprecate :source_transactions, :"Source.list_source_transactions", 2020, 1
|
|
39
44
|
end
|
|
40
45
|
end
|
|
@@ -11,10 +11,15 @@ module Stripe
|
|
|
11
11
|
OBJECT_NAME = "subscription_item"
|
|
12
12
|
|
|
13
13
|
nested_resource_class_methods :usage_record, operations: %i[create]
|
|
14
|
+
nested_resource_class_methods :usage_record_summary,
|
|
15
|
+
operations: %i[list],
|
|
16
|
+
resource_plural: "usage_record_summaries"
|
|
14
17
|
|
|
15
18
|
def usage_record_summaries(params = {}, opts = {})
|
|
16
19
|
resp, opts = request(:get, resource_url + "/usage_record_summaries", params, opts)
|
|
17
20
|
Util.convert_to_stripe_object(resp.data, opts)
|
|
18
21
|
end
|
|
22
|
+
extend Gem::Deprecate
|
|
23
|
+
deprecate :usage_record_summaries, :"SubscriptionItem.list_usage_record_summaries", 2020, 1
|
|
19
24
|
end
|
|
20
25
|
end
|
data/lib/stripe/version.rb
CHANGED
|
@@ -8,12 +8,20 @@ module Stripe
|
|
|
8
8
|
@source = Stripe::Source.retrieve("src_123")
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
should "be listable" do
|
|
11
|
+
should "be listable (DEPRECATED)" do
|
|
12
12
|
transactions = @source.source_transactions
|
|
13
13
|
|
|
14
14
|
assert_requested :get, "#{Stripe.api_base}/v1/sources/#{@source.id}/source_transactions"
|
|
15
15
|
assert transactions.data.is_a?(Array)
|
|
16
16
|
assert transactions.first.is_a?(Stripe::SourceTransaction)
|
|
17
17
|
end
|
|
18
|
+
|
|
19
|
+
should "be listable" do
|
|
20
|
+
transactions = Stripe::Source.list_source_transactions(@source.id)
|
|
21
|
+
|
|
22
|
+
assert_requested :get, "#{Stripe.api_base}/v1/sources/#{@source.id}/source_transactions"
|
|
23
|
+
assert transactions.data.is_a?(Array)
|
|
24
|
+
assert transactions.first.is_a?(Stripe::SourceTransaction)
|
|
25
|
+
end
|
|
18
26
|
end
|
|
19
27
|
end
|
|
@@ -71,5 +71,14 @@ module Stripe
|
|
|
71
71
|
assert_requested :post, "#{Stripe.api_base}/v1/subscription_items/si_123/usage_records"
|
|
72
72
|
end
|
|
73
73
|
end
|
|
74
|
+
|
|
75
|
+
context "#list_usage_record_summaries" do
|
|
76
|
+
should "list usage record summaries" do
|
|
77
|
+
Stripe::SubscriptionItem.list_usage_record_summaries(
|
|
78
|
+
"si_123"
|
|
79
|
+
)
|
|
80
|
+
assert_requested :get, "#{Stripe.api_base}/v1/subscription_items/si_123/usage_record_summaries"
|
|
81
|
+
end
|
|
82
|
+
end
|
|
74
83
|
end
|
|
75
84
|
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: 5.
|
|
4
|
+
version: 5.10.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-
|
|
11
|
+
date: 2019-11-09 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.
|