orb-billing 1.52.0 → 1.54.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.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -0
  3. data/README.md +1 -1
  4. data/lib/orb/models/billable_metric_edited_webhook_event.rb +33 -1
  5. data/lib/orb/models/metric_create_params.rb +24 -1
  6. data/lib/orb/models/metric_list_params.rb +1 -1
  7. data/lib/orb/models/metric_publish_params.rb +20 -0
  8. data/lib/orb/models/metric_update_params.rb +20 -1
  9. data/lib/orb/models/plan.rb +9 -1
  10. data/lib/orb/models/plan_version_phase.rb +9 -1
  11. data/lib/orb/models/plans/migration_cancel_response.rb +19 -1
  12. data/lib/orb/models/plans/migration_list_response.rb +19 -1
  13. data/lib/orb/models/plans/migration_retrieve_response.rb +19 -1
  14. data/lib/orb/models/subscription_create_params.rb +18 -2
  15. data/lib/orb/models/subscription_schedule_plan_change_params.rb +18 -2
  16. data/lib/orb/models/webhooks/billable_metric_edited_standard_webhook_event.rb +35 -1
  17. data/lib/orb/models.rb +2 -0
  18. data/lib/orb/resources/metrics.rb +34 -2
  19. data/lib/orb/version.rb +1 -1
  20. data/lib/orb.rb +1 -0
  21. data/rbi/orb/models/billable_metric_edited_webhook_event.rbi +76 -3
  22. data/rbi/orb/models/metric_create_params.rbi +37 -0
  23. data/rbi/orb/models/metric_list_params.rbi +1 -1
  24. data/rbi/orb/models/metric_publish_params.rbi +33 -0
  25. data/rbi/orb/models/metric_update_params.rbi +22 -0
  26. data/rbi/orb/models/plan.rbi +11 -3
  27. data/rbi/orb/models/plan_version_phase.rbi +11 -3
  28. data/rbi/orb/models/plans/migration_cancel_response.rbi +20 -0
  29. data/rbi/orb/models/plans/migration_list_response.rbi +20 -0
  30. data/rbi/orb/models/plans/migration_retrieve_response.rbi +20 -0
  31. data/rbi/orb/models/subscription_create_params.rbi +16 -0
  32. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +16 -0
  33. data/rbi/orb/models/webhooks/billable_metric_edited_standard_webhook_event.rbi +76 -3
  34. data/rbi/orb/models.rbi +2 -0
  35. data/rbi/orb/resources/metrics.rbi +31 -0
  36. data/sig/orb/models/billable_metric_edited_webhook_event.rbs +30 -3
  37. data/sig/orb/models/metric_create_params.rbs +21 -1
  38. data/sig/orb/models/metric_list_params.rbs +2 -2
  39. data/sig/orb/models/metric_publish_params.rbs +23 -0
  40. data/sig/orb/models/metric_update_params.rbs +11 -1
  41. data/sig/orb/models/plan.rbs +8 -3
  42. data/sig/orb/models/plan_version_phase.rbs +8 -3
  43. data/sig/orb/models/plans/migration_cancel_response.rbs +10 -0
  44. data/sig/orb/models/plans/migration_list_response.rbs +10 -0
  45. data/sig/orb/models/plans/migration_retrieve_response.rbs +10 -0
  46. data/sig/orb/models/subscription_create_params.rbs +19 -2
  47. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +19 -2
  48. data/sig/orb/models/webhooks/billable_metric_edited_standard_webhook_event.rbs +30 -3
  49. data/sig/orb/models.rbs +2 -0
  50. data/sig/orb/resources/metrics.rbs +8 -0
  51. metadata +5 -2
@@ -13,7 +13,7 @@ module Orb
13
13
  # string. See [SQL support](/extensibility/advanced-metrics#sql-support) for a
14
14
  # description of constructing SQL queries with examples.
15
15
  #
16
- # @overload create(description:, item_id:, name:, sql:, metadata: nil, request_options: {})
16
+ # @overload create(description:, item_id:, name:, sql:, metadata: nil, status: nil, request_options: {})
17
17
  #
18
18
  # @param description [String, nil] A description of the metric.
19
19
  #
@@ -25,6 +25,8 @@ module Orb
25
25
  #
26
26
  # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
27
27
  #
28
+ # @param status [Symbol, Orb::Models::MetricCreateParams::Status] The status of the metric to create (either active or draft). If not specified, t
29
+ #
28
30
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
29
31
  #
30
32
  # @return [Orb::Models::BillableMetric]
@@ -49,16 +51,24 @@ module Orb
49
51
  # `name` cannot be empty. If you pass `null` for the metadata value, it will clear
50
52
  # any existing metadata for that metric.
51
53
  #
52
- # @overload update(metric_id, description: nil, metadata: nil, name: nil, request_options: {})
54
+ # While a metric is in `draft` status, its `sql` and `item_id` can also be
55
+ # changed. Use [publish metric](/api-reference/metric/publish-metric) to make a
56
+ # draft metric active.
57
+ #
58
+ # @overload update(metric_id, description: nil, item_id: nil, metadata: nil, name: nil, sql: nil, request_options: {})
53
59
  #
54
60
  # @param metric_id [String]
55
61
  #
56
62
  # @param description [String, nil] A description of the metric.
57
63
  #
64
+ # @param item_id [String, nil] The id of the item to associate the metric with. Can only be changed while the m
65
+ #
58
66
  # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
59
67
  #
60
68
  # @param name [String, nil] The name of the metric.
61
69
  #
70
+ # @param sql [String, nil] A new sql string defining the metric. Can only be changed while the metric is in
71
+ #
62
72
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
63
73
  #
64
74
  # @return [Orb::Models::BillableMetric]
@@ -169,6 +179,28 @@ module Orb
169
179
  )
170
180
  end
171
181
 
182
+ # This endpoint publishes a [metric](/core-concepts#metric) in `draft` status,
183
+ # making it `active`. Only draft metrics can be published, and an active metric
184
+ # can't be moved back into `draft`, so its `sql` and `item_id` can no longer be
185
+ # changed.
186
+ #
187
+ # @overload publish(metric_id, request_options: {})
188
+ #
189
+ # @param metric_id [String]
190
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
191
+ #
192
+ # @return [Orb::Models::BillableMetric]
193
+ #
194
+ # @see Orb::Models::MetricPublishParams
195
+ def publish(metric_id, params = {})
196
+ @client.request(
197
+ method: :post,
198
+ path: ["metrics/%1$s/publish", metric_id],
199
+ model: Orb::BillableMetric,
200
+ options: params[:request_options]
201
+ )
202
+ end
203
+
172
204
  # This endpoint restores an archived [metric](/core-concepts#metric) to `active`,
173
205
  # so it can be chosen for new plans again. Only archived metrics can be
174
206
  # unarchived.
data/lib/orb/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Orb
4
- VERSION = "1.52.0"
4
+ VERSION = "1.54.0"
5
5
  end
data/lib/orb.rb CHANGED
@@ -315,6 +315,7 @@ require_relative "orb/models/metric_create_params"
315
315
  require_relative "orb/models/metric_events_dropped_by_watermark_webhook_event"
316
316
  require_relative "orb/models/metric_fetch_params"
317
317
  require_relative "orb/models/metric_list_params"
318
+ require_relative "orb/models/metric_publish_params"
318
319
  require_relative "orb/models/metric_unarchive_params"
319
320
  require_relative "orb/models/metric_update_params"
320
321
  require_relative "orb/models/minimum"
@@ -187,34 +187,107 @@ module Orb
187
187
  sig { returns(T.nilable(String)) }
188
188
  attr_accessor :description
189
189
 
190
+ sig { returns(T.nilable(String)) }
191
+ attr_accessor :item_id
192
+
190
193
  sig { returns(T.nilable(T::Hash[Symbol, String])) }
191
194
  attr_accessor :metadata
192
195
 
193
196
  sig { returns(T.nilable(String)) }
194
197
  attr_accessor :name
195
198
 
199
+ sig { returns(T.nilable(String)) }
200
+ attr_accessor :sql
201
+
202
+ sig do
203
+ returns(
204
+ T.nilable(
205
+ Orb::BillableMetricEditedWebhookEvent::Properties::PreviousAttributes::Status::TaggedSymbol
206
+ )
207
+ )
208
+ end
209
+ attr_accessor :status
210
+
196
211
  # metadata values are non-null on the wire, as on the price event.
197
212
  sig do
198
213
  params(
199
214
  description: T.nilable(String),
215
+ item_id: T.nilable(String),
200
216
  metadata: T.nilable(T::Hash[Symbol, String]),
201
- name: T.nilable(String)
217
+ name: T.nilable(String),
218
+ sql: T.nilable(String),
219
+ status:
220
+ T.nilable(
221
+ Orb::BillableMetricEditedWebhookEvent::Properties::PreviousAttributes::Status::OrSymbol
222
+ )
202
223
  ).returns(T.attached_class)
203
224
  end
204
- def self.new(description: nil, metadata: nil, name: nil)
225
+ def self.new(
226
+ description: nil,
227
+ item_id: nil,
228
+ metadata: nil,
229
+ name: nil,
230
+ sql: nil,
231
+ status: nil
232
+ )
205
233
  end
206
234
 
207
235
  sig do
208
236
  override.returns(
209
237
  {
210
238
  description: T.nilable(String),
239
+ item_id: T.nilable(String),
211
240
  metadata: T.nilable(T::Hash[Symbol, String]),
212
- name: T.nilable(String)
241
+ name: T.nilable(String),
242
+ sql: T.nilable(String),
243
+ status:
244
+ T.nilable(
245
+ Orb::BillableMetricEditedWebhookEvent::Properties::PreviousAttributes::Status::TaggedSymbol
246
+ )
213
247
  }
214
248
  )
215
249
  end
216
250
  def to_hash
217
251
  end
252
+
253
+ module Status
254
+ extend Orb::Internal::Type::Enum
255
+
256
+ TaggedSymbol =
257
+ T.type_alias do
258
+ T.all(
259
+ Symbol,
260
+ Orb::BillableMetricEditedWebhookEvent::Properties::PreviousAttributes::Status
261
+ )
262
+ end
263
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
264
+
265
+ ACTIVE =
266
+ T.let(
267
+ :active,
268
+ Orb::BillableMetricEditedWebhookEvent::Properties::PreviousAttributes::Status::TaggedSymbol
269
+ )
270
+ ARCHIVED =
271
+ T.let(
272
+ :archived,
273
+ Orb::BillableMetricEditedWebhookEvent::Properties::PreviousAttributes::Status::TaggedSymbol
274
+ )
275
+ DRAFT =
276
+ T.let(
277
+ :draft,
278
+ Orb::BillableMetricEditedWebhookEvent::Properties::PreviousAttributes::Status::TaggedSymbol
279
+ )
280
+
281
+ sig do
282
+ override.returns(
283
+ T::Array[
284
+ Orb::BillableMetricEditedWebhookEvent::Properties::PreviousAttributes::Status::TaggedSymbol
285
+ ]
286
+ )
287
+ end
288
+ def self.values
289
+ end
290
+ end
218
291
  end
219
292
  end
220
293
 
@@ -31,6 +31,15 @@ module Orb
31
31
  sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
32
32
  attr_accessor :metadata
33
33
 
34
+ # The status of the metric to create (either active or draft). If not specified,
35
+ # this defaults to active. A draft metric's `sql` and `item_id` can be changed
36
+ # until it's published.
37
+ sig { returns(T.nilable(Orb::MetricCreateParams::Status::OrSymbol)) }
38
+ attr_reader :status
39
+
40
+ sig { params(status: Orb::MetricCreateParams::Status::OrSymbol).void }
41
+ attr_writer :status
42
+
34
43
  sig do
35
44
  params(
36
45
  description: T.nilable(String),
@@ -38,6 +47,7 @@ module Orb
38
47
  name: String,
39
48
  sql: String,
40
49
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
50
+ status: Orb::MetricCreateParams::Status::OrSymbol,
41
51
  request_options: Orb::RequestOptions::OrHash
42
52
  ).returns(T.attached_class)
43
53
  end
@@ -54,6 +64,10 @@ module Orb
54
64
  # by setting the value to `null`, and the entire metadata mapping can be cleared
55
65
  # by setting `metadata` to `null`.
56
66
  metadata: nil,
67
+ # The status of the metric to create (either active or draft). If not specified,
68
+ # this defaults to active. A draft metric's `sql` and `item_id` can be changed
69
+ # until it's published.
70
+ status: nil,
57
71
  request_options: {}
58
72
  )
59
73
  end
@@ -66,12 +80,35 @@ module Orb
66
80
  name: String,
67
81
  sql: String,
68
82
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
83
+ status: Orb::MetricCreateParams::Status::OrSymbol,
69
84
  request_options: Orb::RequestOptions
70
85
  }
71
86
  )
72
87
  end
73
88
  def to_hash
74
89
  end
90
+
91
+ # The status of the metric to create (either active or draft). If not specified,
92
+ # this defaults to active. A draft metric's `sql` and `item_id` can be changed
93
+ # until it's published.
94
+ module Status
95
+ extend Orb::Internal::Type::Enum
96
+
97
+ TaggedSymbol =
98
+ T.type_alias { T.all(Symbol, Orb::MetricCreateParams::Status) }
99
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
100
+
101
+ ACTIVE = T.let(:active, Orb::MetricCreateParams::Status::TaggedSymbol)
102
+ DRAFT = T.let(:draft, Orb::MetricCreateParams::Status::TaggedSymbol)
103
+
104
+ sig do
105
+ override.returns(
106
+ T::Array[Orb::MetricCreateParams::Status::TaggedSymbol]
107
+ )
108
+ end
109
+ def self.values
110
+ end
111
+ end
75
112
  end
76
113
  end
77
114
  end
@@ -91,8 +91,8 @@ module Orb
91
91
  OrSymbol = T.type_alias { T.any(Symbol, String) }
92
92
 
93
93
  ACTIVE = T.let(:active, Orb::MetricListParams::Status::TaggedSymbol)
94
- ARCHIVED = T.let(:archived, Orb::MetricListParams::Status::TaggedSymbol)
95
94
  DRAFT = T.let(:draft, Orb::MetricListParams::Status::TaggedSymbol)
95
+ ARCHIVED = T.let(:archived, Orb::MetricListParams::Status::TaggedSymbol)
96
96
 
97
97
  sig do
98
98
  override.returns(
@@ -0,0 +1,33 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ class MetricPublishParams < Orb::Internal::Type::BaseModel
6
+ extend Orb::Internal::Type::RequestParameters::Converter
7
+ include Orb::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias { T.any(Orb::MetricPublishParams, Orb::Internal::AnyHash) }
11
+
12
+ sig { returns(String) }
13
+ attr_accessor :metric_id
14
+
15
+ sig do
16
+ params(
17
+ metric_id: String,
18
+ request_options: Orb::RequestOptions::OrHash
19
+ ).returns(T.attached_class)
20
+ end
21
+ def self.new(metric_id:, request_options: {})
22
+ end
23
+
24
+ sig do
25
+ override.returns(
26
+ { metric_id: String, request_options: Orb::RequestOptions }
27
+ )
28
+ end
29
+ def to_hash
30
+ end
31
+ end
32
+ end
33
+ end
@@ -16,6 +16,11 @@ module Orb
16
16
  sig { returns(T.nilable(String)) }
17
17
  attr_accessor :description
18
18
 
19
+ # The id of the item to associate the metric with. Can only be changed while the
20
+ # metric is in `draft` status.
21
+ sig { returns(T.nilable(String)) }
22
+ attr_accessor :item_id
23
+
19
24
  # User-specified key/value pairs for the resource. Individual keys can be removed
20
25
  # by setting the value to `null`, and the entire metadata mapping can be cleared
21
26
  # by setting `metadata` to `null`.
@@ -26,12 +31,20 @@ module Orb
26
31
  sig { returns(T.nilable(String)) }
27
32
  attr_accessor :name
28
33
 
34
+ # A new sql string defining the metric. Can only be changed while the metric is in
35
+ # `draft` status and no price uses it. If the metric has parameters, the new sql
36
+ # must use the same ones.
37
+ sig { returns(T.nilable(String)) }
38
+ attr_accessor :sql
39
+
29
40
  sig do
30
41
  params(
31
42
  metric_id: String,
32
43
  description: T.nilable(String),
44
+ item_id: T.nilable(String),
33
45
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
34
46
  name: T.nilable(String),
47
+ sql: T.nilable(String),
35
48
  request_options: Orb::RequestOptions::OrHash
36
49
  ).returns(T.attached_class)
37
50
  end
@@ -39,12 +52,19 @@ module Orb
39
52
  metric_id:,
40
53
  # A description of the metric.
41
54
  description: nil,
55
+ # The id of the item to associate the metric with. Can only be changed while the
56
+ # metric is in `draft` status.
57
+ item_id: nil,
42
58
  # User-specified key/value pairs for the resource. Individual keys can be removed
43
59
  # by setting the value to `null`, and the entire metadata mapping can be cleared
44
60
  # by setting `metadata` to `null`.
45
61
  metadata: nil,
46
62
  # The name of the metric.
47
63
  name: nil,
64
+ # A new sql string defining the metric. Can only be changed while the metric is in
65
+ # `draft` status and no price uses it. If the metric has parameters, the new sql
66
+ # must use the same ones.
67
+ sql: nil,
48
68
  request_options: {}
49
69
  )
50
70
  end
@@ -54,8 +74,10 @@ module Orb
54
74
  {
55
75
  metric_id: String,
56
76
  description: T.nilable(String),
77
+ item_id: T.nilable(String),
57
78
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
58
79
  name: T.nilable(String),
80
+ sql: T.nilable(String),
59
81
  request_options: Orb::RequestOptions
60
82
  }
61
83
  )
@@ -742,6 +742,10 @@ module Orb
742
742
  sig { returns(Integer) }
743
743
  attr_accessor :order
744
744
 
745
+ # The IDs of the prices active in this phase.
746
+ sig { returns(T::Array[String]) }
747
+ attr_accessor :price_ids
748
+
745
749
  sig do
746
750
  params(
747
751
  id: String,
@@ -764,7 +768,8 @@ module Orb
764
768
  minimum: T.nilable(Orb::Minimum::OrHash),
765
769
  minimum_amount: T.nilable(String),
766
770
  name: String,
767
- order: Integer
771
+ order: Integer,
772
+ price_ids: T::Array[String]
768
773
  ).returns(T.attached_class)
769
774
  end
770
775
  def self.new(
@@ -781,7 +786,9 @@ module Orb
781
786
  minimum_amount:,
782
787
  name:,
783
788
  # Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.
784
- order:
789
+ order:,
790
+ # The IDs of the prices active in this phase.
791
+ price_ids:
785
792
  )
786
793
  end
787
794
 
@@ -799,7 +806,8 @@ module Orb
799
806
  minimum: T.nilable(Orb::Minimum),
800
807
  minimum_amount: T.nilable(String),
801
808
  name: String,
802
- order: Integer
809
+ order: Integer,
810
+ price_ids: T::Array[String]
803
811
  }
804
812
  )
805
813
  end
@@ -29,6 +29,10 @@ module Orb
29
29
  sig { returns(Integer) }
30
30
  attr_accessor :order
31
31
 
32
+ # The IDs of the prices active in this phase.
33
+ sig { returns(T::Array[String]) }
34
+ attr_accessor :price_ids
35
+
32
36
  sig do
33
37
  params(
34
38
  id: String,
@@ -37,7 +41,8 @@ module Orb
37
41
  duration_unit:
38
42
  T.nilable(Orb::PlanVersionPhase::DurationUnit::OrSymbol),
39
43
  name: String,
40
- order: Integer
44
+ order: Integer,
45
+ price_ids: T::Array[String]
41
46
  ).returns(T.attached_class)
42
47
  end
43
48
  def self.new(
@@ -49,7 +54,9 @@ module Orb
49
54
  duration_unit:,
50
55
  name:,
51
56
  # Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.
52
- order:
57
+ order:,
58
+ # The IDs of the prices active in this phase.
59
+ price_ids:
53
60
  )
54
61
  end
55
62
 
@@ -62,7 +69,8 @@ module Orb
62
69
  duration_unit:
63
70
  T.nilable(Orb::PlanVersionPhase::DurationUnit::TaggedSymbol),
64
71
  name: String,
65
- order: Integer
72
+ order: Integer,
73
+ price_ids: T::Array[String]
66
74
  }
67
75
  )
68
76
  end
@@ -28,10 +28,20 @@ module Orb
28
28
  end
29
29
  attr_accessor :effective_time
30
30
 
31
+ # When the migration completed or was canceled, or null if it is still in
32
+ # progress.
33
+ sig { returns(T.nilable(Time)) }
34
+ attr_accessor :ended_at
35
+
31
36
  # The ID of the plan being migrated.
32
37
  sig { returns(String) }
33
38
  attr_accessor :plan_id
34
39
 
40
+ # When Orb began migrating the plan's subscriptions. Null if the migration has not
41
+ # begun, or was canceled before it began.
42
+ sig { returns(T.nilable(Time)) }
43
+ attr_accessor :started_at
44
+
35
45
  # Current status of the migration: 'not_started', 'in_progress', 'completed',
36
46
  # 'action_needed', or 'canceled'.
37
47
  sig do
@@ -52,7 +62,9 @@ module Orb
52
62
  Orb::Models::Plans::MigrationCancelResponse::EffectiveTime::OrSymbol
53
63
  )
54
64
  ),
65
+ ended_at: T.nilable(Time),
55
66
  plan_id: String,
67
+ started_at: T.nilable(Time),
56
68
  status:
57
69
  Orb::Models::Plans::MigrationCancelResponse::Status::OrSymbol
58
70
  ).returns(T.attached_class)
@@ -64,8 +76,14 @@ module Orb
64
76
  # scheduled to be at the end of the current billing period, or 'end_of_invoice'
65
77
  # when scheduled to be at the start of the next invoice.
66
78
  effective_time:,
79
+ # When the migration completed or was canceled, or null if it is still in
80
+ # progress.
81
+ ended_at:,
67
82
  # The ID of the plan being migrated.
68
83
  plan_id:,
84
+ # When Orb began migrating the plan's subscriptions. Null if the migration has not
85
+ # begun, or was canceled before it began.
86
+ started_at:,
69
87
  # Current status of the migration: 'not_started', 'in_progress', 'completed',
70
88
  # 'action_needed', or 'canceled'.
71
89
  status:
@@ -80,7 +98,9 @@ module Orb
80
98
  T.nilable(
81
99
  Orb::Models::Plans::MigrationCancelResponse::EffectiveTime::Variants
82
100
  ),
101
+ ended_at: T.nilable(Time),
83
102
  plan_id: String,
103
+ started_at: T.nilable(Time),
84
104
  status:
85
105
  Orb::Models::Plans::MigrationCancelResponse::Status::TaggedSymbol
86
106
  }
@@ -28,10 +28,20 @@ module Orb
28
28
  end
29
29
  attr_accessor :effective_time
30
30
 
31
+ # When the migration completed or was canceled, or null if it is still in
32
+ # progress.
33
+ sig { returns(T.nilable(Time)) }
34
+ attr_accessor :ended_at
35
+
31
36
  # The ID of the plan being migrated.
32
37
  sig { returns(String) }
33
38
  attr_accessor :plan_id
34
39
 
40
+ # When Orb began migrating the plan's subscriptions. Null if the migration has not
41
+ # begun, or was canceled before it began.
42
+ sig { returns(T.nilable(Time)) }
43
+ attr_accessor :started_at
44
+
35
45
  # Current status of the migration: 'not_started', 'in_progress', 'completed',
36
46
  # 'action_needed', or 'canceled'.
37
47
  sig do
@@ -52,7 +62,9 @@ module Orb
52
62
  Orb::Models::Plans::MigrationListResponse::EffectiveTime::OrSymbol
53
63
  )
54
64
  ),
65
+ ended_at: T.nilable(Time),
55
66
  plan_id: String,
67
+ started_at: T.nilable(Time),
56
68
  status: Orb::Models::Plans::MigrationListResponse::Status::OrSymbol
57
69
  ).returns(T.attached_class)
58
70
  end
@@ -63,8 +75,14 @@ module Orb
63
75
  # scheduled to be at the end of the current billing period, or 'end_of_invoice'
64
76
  # when scheduled to be at the start of the next invoice.
65
77
  effective_time:,
78
+ # When the migration completed or was canceled, or null if it is still in
79
+ # progress.
80
+ ended_at:,
66
81
  # The ID of the plan being migrated.
67
82
  plan_id:,
83
+ # When Orb began migrating the plan's subscriptions. Null if the migration has not
84
+ # begun, or was canceled before it began.
85
+ started_at:,
68
86
  # Current status of the migration: 'not_started', 'in_progress', 'completed',
69
87
  # 'action_needed', or 'canceled'.
70
88
  status:
@@ -79,7 +97,9 @@ module Orb
79
97
  T.nilable(
80
98
  Orb::Models::Plans::MigrationListResponse::EffectiveTime::Variants
81
99
  ),
100
+ ended_at: T.nilable(Time),
82
101
  plan_id: String,
102
+ started_at: T.nilable(Time),
83
103
  status:
84
104
  Orb::Models::Plans::MigrationListResponse::Status::TaggedSymbol
85
105
  }
@@ -28,10 +28,20 @@ module Orb
28
28
  end
29
29
  attr_accessor :effective_time
30
30
 
31
+ # When the migration completed or was canceled, or null if it is still in
32
+ # progress.
33
+ sig { returns(T.nilable(Time)) }
34
+ attr_accessor :ended_at
35
+
31
36
  # The ID of the plan being migrated.
32
37
  sig { returns(String) }
33
38
  attr_accessor :plan_id
34
39
 
40
+ # When Orb began migrating the plan's subscriptions. Null if the migration has not
41
+ # begun, or was canceled before it began.
42
+ sig { returns(T.nilable(Time)) }
43
+ attr_accessor :started_at
44
+
35
45
  # Current status of the migration: 'not_started', 'in_progress', 'completed',
36
46
  # 'action_needed', or 'canceled'.
37
47
  sig do
@@ -52,7 +62,9 @@ module Orb
52
62
  Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime::OrSymbol
53
63
  )
54
64
  ),
65
+ ended_at: T.nilable(Time),
55
66
  plan_id: String,
67
+ started_at: T.nilable(Time),
56
68
  status:
57
69
  Orb::Models::Plans::MigrationRetrieveResponse::Status::OrSymbol
58
70
  ).returns(T.attached_class)
@@ -64,8 +76,14 @@ module Orb
64
76
  # scheduled to be at the end of the current billing period, or 'end_of_invoice'
65
77
  # when scheduled to be at the start of the next invoice.
66
78
  effective_time:,
79
+ # When the migration completed or was canceled, or null if it is still in
80
+ # progress.
81
+ ended_at:,
67
82
  # The ID of the plan being migrated.
68
83
  plan_id:,
84
+ # When Orb began migrating the plan's subscriptions. Null if the migration has not
85
+ # begun, or was canceled before it began.
86
+ started_at:,
69
87
  # Current status of the migration: 'not_started', 'in_progress', 'completed',
70
88
  # 'action_needed', or 'canceled'.
71
89
  status:
@@ -80,7 +98,9 @@ module Orb
80
98
  T.nilable(
81
99
  Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime::Variants
82
100
  ),
101
+ ended_at: T.nilable(Time),
83
102
  plan_id: String,
103
+ started_at: T.nilable(Time),
84
104
  status:
85
105
  Orb::Models::Plans::MigrationRetrieveResponse::Status::TaggedSymbol
86
106
  }