stripe 5.9.0 → 5.10.0

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
  SHA256:
3
- metadata.gz: b59015578d0b75db3e8b02959010a9d3a7a3c4212823ad8b51790a869e32b92a
4
- data.tar.gz: cc8dd57b285effb4814596431b8da59fe92d1a7e34a76d5dc738250a10673142
3
+ metadata.gz: 19022f91eb90d9ea07a8c4f5774e6b83bb5b95e2c09186797f17ef47c2b8c4f1
4
+ data.tar.gz: 7d3559aec5925a016175555e716863fcc461877ab407241ef7d15fe35a3e2f34
5
5
  SHA512:
6
- metadata.gz: 6154e0332f7b4c7d66c2238d4474ce904c0faa129dea9a1e1d03668a03d8b03796c593ddb7f04a76082251e6d08520996a28bd2427d897cb1dd769dfc1c3f8aa
7
- data.tar.gz: 3d4bf185574c11c8c867b1998e4f07f1bce7b4dcaab166d475a5e2406e0cf2275e6d9890bf0df7f94523d36cc58c577819edaa9d301ba96b0d722d4806cbcdac
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
- * [x] ⚠️ #813: Convert library to use built-in `Net::HTTP`
50
- * [x] ⚠️ #816: Make `code` argument in `CardError` named instead of positional.
51
- * [x] ⚠️ #817: Drop support for very old Ruby versions.
52
- * [x] #818: Bump Rubocop to latest version
53
- * [x] #819: Ruby minimum version increase followup
54
- * [x] ⚠️ #820: Remove old deprecated methods
55
- * [x] ⚠️ #823: Remove all alias for list methods
56
- * [x] ⚠️ #826: Remove `UsageRecord.create` method
57
- * [x] ⚠️ #827: Remove `IssuerFraudRecord`
58
- * [x] #811: Add `ErrorObject` to `StripeError` exceptions
59
- * [x] #828: Tweak retry logic to be a little more like stripe-node
60
- * [x] #829: Reset connections when connection-changing configuration changes (optional)
61
- * [x] #830: Fix inverted sign for 500 retries
62
- * [x] ⚠️#831: Remove a few more very old deprecated methods
63
- * [x] #832: Minor cleanup in `StripeClient`
64
- * [x] #833: Do better bookkeeping when tracking state in `Thread.current`
65
- * [x] #834: Add `Invoice.list_upcoming_line_items` method
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.9.0
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "5.9.0"
4
+ VERSION = "5.10.0"
5
5
  end
@@ -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.9.0
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-07 00:00:00.000000000 Z
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.