stripe 4.22.1 → 4.23.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: 476e36b3d00026b4ecee9ec154dfaed3063cb9faab0ec44d7384e2670715a64c
4
- data.tar.gz: 67483a0122ac08406cbd2c0b0ee33b332dafae86100ab5439f15f674662d071e
3
+ metadata.gz: 971d8e2630db1ab5e7317a3ae4320efc9b40dcdbf706995bb930e955669088fa
4
+ data.tar.gz: 73a6a25b4aa3de37baa3dc4092d3c56e930a857250b8a7ebce8843511022eb3f
5
5
  SHA512:
6
- metadata.gz: 4632faee7ec59e8eb024bf27c08e98bd97c1b41b5872db0b1d13cb5611770e6ab16154e73ab1989d2a50e6ad7b4e94902395f5af5aa718f99122eef29ac83908
7
- data.tar.gz: 0bd55c06591145a77defb666ff50ab292c75366d6cd46b315edbad7fd25a12931bce725c4d0d81c1faf67d3294594482e5c9b6f481ed344458d69cade3ec1697
6
+ metadata.gz: 021f1c534b92cea616d141a076474308717052fa2e78cf09ceb7ba8f7e549c5cf4fced0f609485a2876497a1a008d9f32cf362b5ae8d9def38b2ae96d8306b25
7
+ data.tar.gz: 2379e1195b665550d267aefe2bf9f0e24821503dc6d49775576069035feee3316ea7f673c6b57846f58ba222264e29c888376484a5220490095d97213cca2bf6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.23.0 - 2019-08-09
4
+ * [#824](https://github.com/stripe/stripe-ruby/pull/824) Remove SubscriptionScheduleRevision
5
+ - This is technically a breaking change. We've chosen to release it as a minor vesion bump because the associated API is unused.
6
+
3
7
  ## 4.22.1 - 2019-08-09
4
8
  * [#808](https://github.com/stripe/stripe-ruby/pull/808) Unify request/response handling
5
9
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.22.1
1
+ 4.23.0
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # rubocop:disable Metrics/LineLength
4
3
  # rubocop:disable Metrics/MethodLength
5
4
 
6
5
  module Stripe
@@ -76,7 +75,6 @@ module Stripe
76
75
  Subscription::OBJECT_NAME => Subscription,
77
76
  SubscriptionItem::OBJECT_NAME => SubscriptionItem,
78
77
  SubscriptionSchedule::OBJECT_NAME => SubscriptionSchedule,
79
- SubscriptionScheduleRevision::OBJECT_NAME => SubscriptionScheduleRevision,
80
78
  TaxId::OBJECT_NAME => TaxId,
81
79
  TaxRate::OBJECT_NAME => TaxRate,
82
80
  Terminal::ConnectionToken::OBJECT_NAME => Terminal::ConnectionToken,
@@ -94,5 +92,4 @@ module Stripe
94
92
  end
95
93
  end
96
94
 
97
- # rubocop:enable Metrics/LineLength
98
95
  # rubocop:enable Metrics/MethodLength
@@ -64,7 +64,6 @@ require "stripe/resources/source_transaction"
64
64
  require "stripe/resources/subscription"
65
65
  require "stripe/resources/subscription_item"
66
66
  require "stripe/resources/subscription_schedule"
67
- require "stripe/resources/subscription_schedule_revision"
68
67
  require "stripe/resources/tax_id"
69
68
  require "stripe/resources/tax_rate"
70
69
  require "stripe/resources/terminal/connection_token"
@@ -5,15 +5,12 @@ module Stripe
5
5
  extend Stripe::APIOperations::Create
6
6
  extend Stripe::APIOperations::List
7
7
  include Stripe::APIOperations::Save
8
- extend Stripe::APIOperations::NestedResource
9
8
 
10
9
  OBJECT_NAME = "subscription_schedule".freeze
11
10
 
12
11
  custom_method :cancel, http_verb: :post
13
12
  custom_method :release, http_verb: :post
14
13
 
15
- nested_resource_class_methods :revision, operations: %i[retrieve list]
16
-
17
14
  def cancel(params = {}, opts = {})
18
15
  request_stripe_object(
19
16
  method: :post,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "4.22.1".freeze
4
+ VERSION = "4.23.0".freeze
5
5
  end
@@ -78,39 +78,5 @@ module Stripe
78
78
  assert schedule.is_a?(Stripe::SubscriptionSchedule)
79
79
  end
80
80
  end
81
-
82
- context "#revisions" do
83
- should "retrieve the subscription schedule's revisions" do
84
- schedule = Stripe::SubscriptionSchedule.retrieve("sub_sched_123")
85
- revisions = schedule.revisions
86
- assert_requested :get,
87
- "#{Stripe.api_base}/v1/subscription_schedules/sub_sched_123/revisions"
88
- assert revisions.data.is_a?(Array)
89
- assert revisions.data[0].is_a?(Stripe::SubscriptionScheduleRevision)
90
- end
91
- end
92
-
93
- context "#retrieve_revision" do
94
- should "retrieve a subscription schedule revision" do
95
- revision = Stripe::SubscriptionSchedule.retrieve_revision(
96
- "sub_sched_123",
97
- "sub_sched_rev_123"
98
- )
99
- assert_requested :get, "#{Stripe.api_base}/v1/subscription_schedules/sub_sched_123/revisions/sub_sched_rev_123"
100
- assert revision.is_a?(Stripe::SubscriptionScheduleRevision)
101
- end
102
- end
103
-
104
- context "#list_revisions" do
105
- should "list a subscription schedule's revisions" do
106
- revisions = Stripe::SubscriptionSchedule.list_revisions(
107
- "sub_sched_123"
108
- )
109
- assert_requested :get, "#{Stripe.api_base}/v1/subscription_schedules/sub_sched_123/revisions"
110
- assert revisions.is_a?(Stripe::ListObject)
111
- assert revisions.data.is_a?(Array)
112
- assert revisions.data[0].is_a?(Stripe::SubscriptionScheduleRevision)
113
- end
114
- end
115
81
  end
116
82
  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.22.1
4
+ version: 4.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: 2019-08-09 00:00:00.000000000 Z
11
+ date: 2019-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -142,7 +142,6 @@ files:
142
142
  - lib/stripe/resources/subscription.rb
143
143
  - lib/stripe/resources/subscription_item.rb
144
144
  - lib/stripe/resources/subscription_schedule.rb
145
- - lib/stripe/resources/subscription_schedule_revision.rb
146
145
  - lib/stripe/resources/tax_id.rb
147
146
  - lib/stripe/resources/tax_rate.rb
148
147
  - lib/stripe/resources/terminal/connection_token.rb
@@ -230,7 +229,6 @@ files:
230
229
  - test/stripe/stripe_object_test.rb
231
230
  - test/stripe/stripe_response_test.rb
232
231
  - test/stripe/subscription_item_test.rb
233
- - test/stripe/subscription_schedule_revision_test.rb
234
232
  - test/stripe/subscription_schedule_test.rb
235
233
  - test/stripe/subscription_test.rb
236
234
  - test/stripe/tax_id_test.rb
@@ -347,7 +345,6 @@ test_files:
347
345
  - test/stripe/stripe_object_test.rb
348
346
  - test/stripe/stripe_response_test.rb
349
347
  - test/stripe/subscription_item_test.rb
350
- - test/stripe/subscription_schedule_revision_test.rb
351
348
  - test/stripe/subscription_schedule_test.rb
352
349
  - test/stripe/subscription_test.rb
353
350
  - test/stripe/tax_id_test.rb
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Stripe
4
- class SubscriptionScheduleRevision < APIResource
5
- extend Stripe::APIOperations::List
6
-
7
- OBJECT_NAME = "subscription_schedule_revision".freeze
8
-
9
- def resource_url
10
- if !respond_to?(:schedule) || schedule.nil?
11
- raise NotImplementedError,
12
- "Subscription schedule revisions cannot be accessed without a " \
13
- "subscription schedule ID."
14
- end
15
- "#{SubscriptionSchedule.resource_url}/#{CGI.escape(schedule)}" \
16
- "/revisions/#{CGI.escape(id)}"
17
- end
18
-
19
- def self.retrieve(_id, _opts = {})
20
- raise NotImplementedError,
21
- "Subscription schedule revisions cannot be retrieved without a " \
22
- "subscription schedule ID. Retrieve a subscribtion schedule " \
23
- "revision using `SubscriptionSchedule.retrieve_revision(" \
24
- "'schedule_id', 'revision_id')`"
25
- end
26
-
27
- def self.list(_id, _opts = {})
28
- raise NotImplementedError,
29
- "Subscription schedule revisions cannot be listed without a " \
30
- "subscription schedule ID. List subscribtion schedule revisions " \
31
- "using `SubscriptionSchedule.list_revisions('schedule_id')`"
32
- end
33
- end
34
- end
@@ -1,37 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require ::File.expand_path("../test_helper", __dir__)
4
-
5
- module Stripe
6
- class SubscriptionScheduleRevisionTest < Test::Unit::TestCase
7
- context "#resource_url" do
8
- should "return a resource URL" do
9
- revision = Stripe::SubscriptionScheduleRevision.construct_from(
10
- id: "sub_sched_rev_123",
11
- schedule: "sub_sched_123"
12
- )
13
- assert_equal "/v1/subscription_schedules/sub_sched_123/revisions/sub_sched_rev_123",
14
- revision.resource_url
15
- end
16
-
17
- should "raise without a subscription schedule" do
18
- revision = Stripe::SubscriptionScheduleRevision.construct_from(id: "sub_sched_rev_123")
19
- assert_raises NotImplementedError do
20
- revision.resource_url
21
- end
22
- end
23
- end
24
-
25
- should "raise on #retrieve" do
26
- assert_raises NotImplementedError do
27
- Stripe::SubscriptionScheduleRevision.retrieve("sub_sched_rev_123")
28
- end
29
- end
30
-
31
- should "raise on #list" do
32
- assert_raises NotImplementedError do
33
- Stripe::SubscriptionScheduleRevision.list("sub_sched_rev_123", {})
34
- end
35
- end
36
- end
37
- end