orb-billing 1.55.0 → 1.57.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 (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/orb/client.rb +7 -0
  5. data/lib/orb/models/metric_update_params.rb +4 -3
  6. data/lib/orb/models/migration_cancel_params.rb +20 -0
  7. data/lib/orb/models/migration_cancel_response.rb +133 -0
  8. data/lib/orb/models/migration_create_params.rb +159 -0
  9. data/lib/orb/models/migration_create_response.rb +133 -0
  10. data/lib/orb/models/migration_list_params.rb +48 -0
  11. data/lib/orb/models/migration_list_response.rb +133 -0
  12. data/lib/orb/models/migration_retrieve_params.rb +20 -0
  13. data/lib/orb/models/migration_retrieve_response.rb +133 -0
  14. data/lib/orb/models/migration_subscription.rb +75 -0
  15. data/lib/orb/models/migrations/subscription_list_params.rb +74 -0
  16. data/lib/orb/models/plan.rb +9 -1
  17. data/lib/orb/models/plans/migration_cancel_response.rb +28 -8
  18. data/lib/orb/models/plans/migration_list_response.rb +28 -8
  19. data/lib/orb/models/plans/migration_retrieve_response.rb +28 -8
  20. data/lib/orb/models.rb +12 -0
  21. data/lib/orb/resources/metrics.rb +11 -10
  22. data/lib/orb/resources/migrations/subscriptions.rb +60 -0
  23. data/lib/orb/resources/migrations.rb +153 -0
  24. data/lib/orb/version.rb +1 -1
  25. data/lib/orb.rb +12 -0
  26. data/rbi/orb/client.rbi +6 -0
  27. data/rbi/orb/models/metric_update_params.rbi +6 -4
  28. data/rbi/orb/models/migration_cancel_params.rbi +35 -0
  29. data/rbi/orb/models/migration_cancel_response.rbi +218 -0
  30. data/rbi/orb/models/migration_create_params.rbi +248 -0
  31. data/rbi/orb/models/migration_create_response.rbi +218 -0
  32. data/rbi/orb/models/migration_list_params.rbi +66 -0
  33. data/rbi/orb/models/migration_list_response.rbi +214 -0
  34. data/rbi/orb/models/migration_retrieve_params.rbi +35 -0
  35. data/rbi/orb/models/migration_retrieve_response.rbi +221 -0
  36. data/rbi/orb/models/migration_subscription.rbi +112 -0
  37. data/rbi/orb/models/migrations/subscription_list_params.rbi +147 -0
  38. data/rbi/orb/models/plan.rbi +8 -0
  39. data/rbi/orb/models/plans/migration_cancel_response.rbi +36 -12
  40. data/rbi/orb/models/plans/migration_list_response.rbi +36 -12
  41. data/rbi/orb/models/plans/migration_retrieve_response.rbi +36 -12
  42. data/rbi/orb/models.rbi +12 -0
  43. data/rbi/orb/resources/metrics.rbi +13 -11
  44. data/rbi/orb/resources/migrations/subscriptions.rbi +54 -0
  45. data/rbi/orb/resources/migrations.rbi +130 -0
  46. data/sig/orb/client.rbs +2 -0
  47. data/sig/orb/models/migration_cancel_params.rbs +23 -0
  48. data/sig/orb/models/migration_cancel_response.rbs +84 -0
  49. data/sig/orb/models/migration_create_params.rbs +126 -0
  50. data/sig/orb/models/migration_create_response.rbs +84 -0
  51. data/sig/orb/models/migration_list_params.rbs +43 -0
  52. data/sig/orb/models/migration_list_response.rbs +84 -0
  53. data/sig/orb/models/migration_retrieve_params.rbs +23 -0
  54. data/sig/orb/models/migration_retrieve_response.rbs +84 -0
  55. data/sig/orb/models/migration_subscription.rbs +54 -0
  56. data/sig/orb/models/migrations/subscription_list_params.rbs +64 -0
  57. data/sig/orb/models/plan.rbs +5 -0
  58. data/sig/orb/models/plans/migration_cancel_response.rbs +17 -4
  59. data/sig/orb/models/plans/migration_list_response.rbs +17 -4
  60. data/sig/orb/models/plans/migration_retrieve_response.rbs +17 -4
  61. data/sig/orb/models.rbs +12 -0
  62. data/sig/orb/resources/migrations/subscriptions.rbs +18 -0
  63. data/sig/orb/resources/migrations.rbs +44 -0
  64. metadata +37 -1
@@ -12,9 +12,10 @@ module Orb
12
12
  required :id, String
13
13
 
14
14
  # @!attribute effective_time
15
- # When the migration takes effect. Can be a specific date/time, 'end_of_term' when
16
- # scheduled to be at the end of the current billing period, or 'end_of_invoice'
17
- # when scheduled to be at the start of the next invoice.
15
+ # When the migration takes effect. Can be a specific date/time, 'start_of_term' or
16
+ # 'end_of_term' when scheduled to be at the start or end of the current billing
17
+ # period, or 'start_of_invoice' or 'end_of_invoice' when scheduled to be at the
18
+ # start of the current or next invoice.
18
19
  #
19
20
  # @return [Date, Time, Symbol, Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime, nil]
20
21
  required :effective_time,
@@ -48,13 +49,23 @@ module Orb
48
49
  # @return [Symbol, Orb::Models::Plans::MigrationRetrieveResponse::Status]
49
50
  required :status, enum: -> { Orb::Models::Plans::MigrationRetrieveResponse::Status }
50
51
 
51
- # @!method initialize(id:, effective_time:, ended_at:, plan_id:, started_at:, status:)
52
+ # @!attribute target_plan_version_number
53
+ # The plan version subscriptions are migrated to.
54
+ #
55
+ # @return [Integer]
56
+ required :target_plan_version_number, Integer
57
+
58
+ # @!method initialize(id:, effective_time:, ended_at:, plan_id:, started_at:, status:, target_plan_version_number:)
52
59
  # Some parameter documentations has been truncated, see
53
60
  # {Orb::Models::Plans::MigrationRetrieveResponse} for more details.
54
61
  #
62
+ # A migration moves a plan's subscriptions onto one of the plan's versions. Each
63
+ # subscription is migrated asynchronously, either immediately or at a scheduled
64
+ # time, and the migration reports its overall status as it progresses.
65
+ #
55
66
  # @param id [String] Unique identifier for this plan version change.
56
67
  #
57
- # @param effective_time [Date, Time, Symbol, Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime, nil] When the migration takes effect. Can be a specific date/time, 'end_of_term' when
68
+ # @param effective_time [Date, Time, Symbol, Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime, nil] When the migration takes effect. Can be a specific date/time, 'start_of_term' or
58
69
  #
59
70
  # @param ended_at [Time, nil] When the migration completed or was canceled, or null if it is still in progress
60
71
  #
@@ -63,10 +74,13 @@ module Orb
63
74
  # @param started_at [Time, nil] When Orb began migrating the plan's subscriptions. Null if the migration has not
64
75
  #
65
76
  # @param status [Symbol, Orb::Models::Plans::MigrationRetrieveResponse::Status] Current status of the migration: 'not_started', 'in_progress', 'completed', 'act
77
+ #
78
+ # @param target_plan_version_number [Integer] The plan version subscriptions are migrated to.
66
79
 
67
- # When the migration takes effect. Can be a specific date/time, 'end_of_term' when
68
- # scheduled to be at the end of the current billing period, or 'end_of_invoice'
69
- # when scheduled to be at the start of the next invoice.
80
+ # When the migration takes effect. Can be a specific date/time, 'start_of_term' or
81
+ # 'end_of_term' when scheduled to be at the start or end of the current billing
82
+ # period, or 'start_of_invoice' or 'end_of_invoice' when scheduled to be at the
83
+ # start of the current or next invoice.
70
84
  #
71
85
  # @see Orb::Models::Plans::MigrationRetrieveResponse#effective_time
72
86
  module EffectiveTime
@@ -76,8 +90,12 @@ module Orb
76
90
 
77
91
  variant Time
78
92
 
93
+ variant const: -> { Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime::START_OF_TERM }
94
+
79
95
  variant const: -> { Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime::END_OF_TERM }
80
96
 
97
+ variant const: -> { Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime::START_OF_INVOICE }
98
+
81
99
  variant const: -> { Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime::END_OF_INVOICE }
82
100
 
83
101
  # @!method self.variants
@@ -89,7 +107,9 @@ module Orb
89
107
 
90
108
  # @!group
91
109
 
110
+ START_OF_TERM = :start_of_term
92
111
  END_OF_TERM = :end_of_term
112
+ START_OF_INVOICE = :start_of_invoice
93
113
  END_OF_INVOICE = :end_of_invoice
94
114
 
95
115
  # @!endgroup
data/lib/orb/models.rb CHANGED
@@ -409,6 +409,18 @@ module Orb
409
409
 
410
410
  MetricUpdateParams = Orb::Models::MetricUpdateParams
411
411
 
412
+ MigrationCancelParams = Orb::Models::MigrationCancelParams
413
+
414
+ MigrationCreateParams = Orb::Models::MigrationCreateParams
415
+
416
+ MigrationListParams = Orb::Models::MigrationListParams
417
+
418
+ MigrationRetrieveParams = Orb::Models::MigrationRetrieveParams
419
+
420
+ Migrations = Orb::Models::Migrations
421
+
422
+ MigrationSubscription = Orb::Models::MigrationSubscription
423
+
412
424
  Minimum = Orb::Models::Minimum
413
425
 
414
426
  MinimumInterval = Orb::Models::MinimumInterval
@@ -46,14 +46,16 @@ module Orb
46
46
  # Some parameter documentations has been truncated, see
47
47
  # {Orb::Models::MetricUpdateParams} for more details.
48
48
  #
49
- # This endpoint allows you to update the `name`, `description`, and `metadata`
50
- # properties on a metric. Fields left out of the request are not changed, and
51
- # `name` cannot be empty. If you pass `null` for the metadata value, it will clear
52
- # any existing metadata for that metric.
49
+ # This endpoint allows you to update the `name`, `description`, `item_id`, and
50
+ # `metadata` properties on a metric. Fields left out of the request are not
51
+ # changed, and `name` cannot be empty. If you pass `null` for the metadata value,
52
+ # it will clear any existing metadata for that metric. Changing `item_id` applies
53
+ # to prices created on the metric afterwards; existing prices keep the item they
54
+ # were created with.
53
55
  #
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.
56
+ # While a metric is in `draft` status, its `sql` can also be changed. Use
57
+ # [publish metric](/api-reference/metric/publish-metric) to make a draft metric
58
+ # active.
57
59
  #
58
60
  # @overload update(metric_id, description: nil, item_id: nil, metadata: nil, name: nil, sql: nil, request_options: {})
59
61
  #
@@ -61,7 +63,7 @@ module Orb
61
63
  #
62
64
  # @param description [String, nil] A description of the metric.
63
65
  #
64
- # @param item_id [String, nil] The id of the item to associate the metric with. Can only be changed while the m
66
+ # @param item_id [String, nil] The id of the item to associate the metric with. Prices created on the metric af
65
67
  #
66
68
  # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
67
69
  #
@@ -181,8 +183,7 @@ module Orb
181
183
 
182
184
  # This endpoint publishes a [metric](/core-concepts#metric) in `draft` status,
183
185
  # 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
+ # can't be moved back into `draft`, so its `sql` can no longer be changed.
186
187
  #
187
188
  # @overload publish(metric_id, request_options: {})
188
189
  #
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orb
4
+ module Resources
5
+ class Migrations
6
+ # A migration moves a plan's subscriptions onto one of the plan's versions. Each
7
+ # subscription is migrated asynchronously, either immediately or at a scheduled
8
+ # time, and the migration reports its overall status as it progresses.
9
+ class Subscriptions
10
+ # Some parameter documentations has been truncated, see
11
+ # {Orb::Models::Migrations::SubscriptionListParams} for more details.
12
+ #
13
+ # This endpoint returns the subscriptions a migration applies to, with the status
14
+ # of each one. A subscription that could not be migrated has the status `failed`
15
+ # and a `failure_reason`.
16
+ #
17
+ # The list is empty until the migration has finished selecting its subscriptions.
18
+ # Once a migration is canceled, only the subscriptions it processed before the
19
+ # cancellation are returned.
20
+ #
21
+ # @overload list(migration_id, cursor: nil, limit: nil, status: nil, subscription_id: nil, request_options: {})
22
+ #
23
+ # @param migration_id [String]
24
+ #
25
+ # @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned
26
+ #
27
+ # @param limit [Integer] The number of items to fetch. Defaults to 20.
28
+ #
29
+ # @param status [Array<Symbol, Orb::Models::Migrations::SubscriptionListParams::Status>, nil] Only return subscriptions with one of these statuses.
30
+ #
31
+ # @param subscription_id [Array<String>, nil] Only return these subscriptions. Up to 100 IDs.
32
+ #
33
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
34
+ #
35
+ # @return [Orb::Internal::Page<Orb::Models::MigrationSubscription>]
36
+ #
37
+ # @see Orb::Models::Migrations::SubscriptionListParams
38
+ def list(migration_id, params = {})
39
+ parsed, options = Orb::Migrations::SubscriptionListParams.dump_request(params)
40
+ query = Orb::Internal::Util.encode_query_params(parsed)
41
+ @client.request(
42
+ method: :get,
43
+ path: ["migrations/%1$s/subscriptions", migration_id],
44
+ query: query,
45
+ page: Orb::Internal::Page,
46
+ model: Orb::MigrationSubscription,
47
+ options: options
48
+ )
49
+ end
50
+
51
+ # @api private
52
+ #
53
+ # @param client [Orb::Client]
54
+ def initialize(client:)
55
+ @client = client
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,153 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orb
4
+ module Resources
5
+ # A migration moves a plan's subscriptions onto one of the plan's versions. Each
6
+ # subscription is migrated asynchronously, either immediately or at a scheduled
7
+ # time, and the migration reports its overall status as it progresses.
8
+ class Migrations
9
+ # A migration moves a plan's subscriptions onto one of the plan's versions. Each
10
+ # subscription is migrated asynchronously, either immediately or at a scheduled
11
+ # time, and the migration reports its overall status as it progresses.
12
+ # @return [Orb::Resources::Migrations::Subscriptions]
13
+ attr_reader :subscriptions
14
+
15
+ # Some parameter documentations has been truncated, see
16
+ # {Orb::Models::MigrationCreateParams} for more details.
17
+ #
18
+ # This endpoint creates a migration of a plan's subscriptions to one of its
19
+ # versions. With `included_subscription_ids` it migrates exactly those
20
+ # subscriptions; otherwise it migrates the plan's subscriptions that match the
21
+ # filters. Each subscription is migrated asynchronously; fetch the migration to
22
+ # follow its status.
23
+ #
24
+ # @overload create(effective_time:, target_plan_version_number:, allow_invoice_credit_or_void: nil, can_defer_billing: nil, effective_date: nil, excluded_subscription_ids: nil, external_plan_id: nil, in_trial: nil, included_subscription_ids: nil, plan_id: nil, plan_version_numbers: nil, reason: nil, statuses: nil, request_options: {})
25
+ #
26
+ # @param effective_time [Symbol, Orb::Models::MigrationCreateParams::EffectiveTime] When the migration takes effect: 'immediately', 'requested_date' on `effective_d
27
+ #
28
+ # @param target_plan_version_number [Integer] The plan version to migrate subscriptions to. It can't be a draft version.
29
+ #
30
+ # @param allow_invoice_credit_or_void [Boolean] When false, a subscription whose migration would void an issued invoice or creat
31
+ #
32
+ # @param can_defer_billing [Boolean] When true, an in-arrears price the migration ends mid-cycle bills its final line
33
+ #
34
+ # @param effective_date [Date, nil] The date the migration takes effect, at midnight in each customer's timezone. Re
35
+ #
36
+ # @param excluded_subscription_ids [Array<String>, nil] Leave these subscriptions out. Can't be combined with `included_subscription_ids
37
+ #
38
+ # @param external_plan_id [String, nil] The external ID of the plan whose subscriptions to migrate.
39
+ #
40
+ # @param in_trial [Boolean, nil] `true` migrates only subscriptions in a trial, `false` only subscriptions not in
41
+ #
42
+ # @param included_subscription_ids [Array<String>, nil] Migrate only these subscriptions. When set, the filters below are ignored.
43
+ #
44
+ # @param plan_id [String, nil] The plan whose subscriptions to migrate. Exactly one of `plan_id` and
45
+ # `external\_
46
+ #
47
+ # @param plan_version_numbers [Array<Integer>, nil] Migrate only subscriptions currently on these plan versions.
48
+ #
49
+ # @param reason [String, nil] Why the migration was created.
50
+ #
51
+ # @param statuses [Array<Symbol, Orb::Models::MigrationCreateParams::Status>] Migrate subscriptions with these statuses. Defaults to active subscriptions.
52
+ #
53
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
54
+ #
55
+ # @return [Orb::Models::MigrationCreateResponse]
56
+ #
57
+ # @see Orb::Models::MigrationCreateParams
58
+ def create(params)
59
+ parsed, options = Orb::MigrationCreateParams.dump_request(params)
60
+ @client.request(
61
+ method: :post,
62
+ path: "migrations",
63
+ body: parsed,
64
+ model: Orb::Models::MigrationCreateResponse,
65
+ options: options
66
+ )
67
+ end
68
+
69
+ # This endpoint returns a migration identified by its ID.
70
+ #
71
+ # @overload retrieve(migration_id, request_options: {})
72
+ #
73
+ # @param migration_id [String]
74
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
75
+ #
76
+ # @return [Orb::Models::MigrationRetrieveResponse]
77
+ #
78
+ # @see Orb::Models::MigrationRetrieveParams
79
+ def retrieve(migration_id, params = {})
80
+ @client.request(
81
+ method: :get,
82
+ path: ["migrations/%1$s", migration_id],
83
+ model: Orb::Models::MigrationRetrieveResponse,
84
+ options: params[:request_options]
85
+ )
86
+ end
87
+
88
+ # Some parameter documentations has been truncated, see
89
+ # {Orb::Models::MigrationListParams} for more details.
90
+ #
91
+ # This endpoint returns a list of migrations across all plans in the account,
92
+ # optionally filtered by plan (`plan_id` or `external_plan_id`). The list of
93
+ # migrations is ordered starting from the most recently created migration. The
94
+ # response also includes pagination_metadata, which lets the caller retrieve the
95
+ # next page of results if they exist.
96
+ #
97
+ # @overload list(cursor: nil, external_plan_id: nil, limit: nil, plan_id: nil, request_options: {})
98
+ #
99
+ # @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned
100
+ #
101
+ # @param external_plan_id [String, nil]
102
+ #
103
+ # @param limit [Integer] The number of items to fetch. Defaults to 20.
104
+ #
105
+ # @param plan_id [String, nil]
106
+ #
107
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
108
+ #
109
+ # @return [Orb::Internal::Page<Orb::Models::MigrationListResponse>]
110
+ #
111
+ # @see Orb::Models::MigrationListParams
112
+ def list(params = {})
113
+ parsed, options = Orb::MigrationListParams.dump_request(params)
114
+ query = Orb::Internal::Util.encode_query_params(parsed)
115
+ @client.request(
116
+ method: :get,
117
+ path: "migrations",
118
+ query: query,
119
+ page: Orb::Internal::Page,
120
+ model: Orb::Models::MigrationListResponse,
121
+ options: options
122
+ )
123
+ end
124
+
125
+ # This endpoint cancels a migration identified by its ID.
126
+ #
127
+ # @overload cancel(migration_id, request_options: {})
128
+ #
129
+ # @param migration_id [String]
130
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
131
+ #
132
+ # @return [Orb::Models::MigrationCancelResponse]
133
+ #
134
+ # @see Orb::Models::MigrationCancelParams
135
+ def cancel(migration_id, params = {})
136
+ @client.request(
137
+ method: :post,
138
+ path: ["migrations/%1$s/cancel", migration_id],
139
+ model: Orb::Models::MigrationCancelResponse,
140
+ options: params[:request_options]
141
+ )
142
+ end
143
+
144
+ # @api private
145
+ #
146
+ # @param client [Orb::Client]
147
+ def initialize(client:)
148
+ @client = client
149
+ @subscriptions = Orb::Resources::Migrations::Subscriptions.new(client: client)
150
+ end
151
+ end
152
+ end
153
+ end
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.55.0"
4
+ VERSION = "1.57.0"
5
5
  end
data/lib/orb.rb CHANGED
@@ -318,6 +318,16 @@ require_relative "orb/models/metric_list_params"
318
318
  require_relative "orb/models/metric_publish_params"
319
319
  require_relative "orb/models/metric_unarchive_params"
320
320
  require_relative "orb/models/metric_update_params"
321
+ require_relative "orb/models/migration_cancel_params"
322
+ require_relative "orb/models/migration_cancel_response"
323
+ require_relative "orb/models/migration_create_params"
324
+ require_relative "orb/models/migration_create_response"
325
+ require_relative "orb/models/migration_list_params"
326
+ require_relative "orb/models/migration_list_response"
327
+ require_relative "orb/models/migration_retrieve_params"
328
+ require_relative "orb/models/migration_retrieve_response"
329
+ require_relative "orb/models/migrations/subscription_list_params"
330
+ require_relative "orb/models/migration_subscription"
321
331
  require_relative "orb/models/minimum"
322
332
  require_relative "orb/models/minimum_interval"
323
333
  require_relative "orb/models/monetary_amount_discount_adjustment"
@@ -661,6 +671,8 @@ require_relative "orb/resources/licenses/external_licenses"
661
671
  require_relative "orb/resources/licenses/usage"
662
672
  require_relative "orb/resources/license_types"
663
673
  require_relative "orb/resources/metrics"
674
+ require_relative "orb/resources/migrations"
675
+ require_relative "orb/resources/migrations/subscriptions"
664
676
  require_relative "orb/resources/plans"
665
677
  require_relative "orb/resources/plans/external_plan_id"
666
678
  require_relative "orb/resources/plans/migrations"
data/rbi/orb/client.rbi CHANGED
@@ -109,6 +109,12 @@ module Orb
109
109
  sig { returns(Orb::Resources::Plans) }
110
110
  attr_reader :plans
111
111
 
112
+ # A migration moves a plan's subscriptions onto one of the plan's versions. Each
113
+ # subscription is migrated asynchronously, either immediately or at a scheduled
114
+ # time, and the migration reports its overall status as it progresses.
115
+ sig { returns(Orb::Resources::Migrations) }
116
+ attr_reader :migrations
117
+
112
118
  # The Price resource represents a price that can be billed on a subscription,
113
119
  # resulting in a charge on an invoice in the form of an invoice line item. Prices
114
120
  # take a quantity and determine an amount to bill.
@@ -16,8 +16,9 @@ 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.
19
+ # The id of the item to associate the metric with. Prices created on the metric
20
+ # afterwards use the new item; existing prices keep the item they were created
21
+ # with.
21
22
  sig { returns(T.nilable(String)) }
22
23
  attr_accessor :item_id
23
24
 
@@ -52,8 +53,9 @@ module Orb
52
53
  metric_id:,
53
54
  # A description of the metric.
54
55
  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.
56
+ # The id of the item to associate the metric with. Prices created on the metric
57
+ # afterwards use the new item; existing prices keep the item they were created
58
+ # with.
57
59
  item_id: nil,
58
60
  # User-specified key/value pairs for the resource. Individual keys can be removed
59
61
  # by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -0,0 +1,35 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ class MigrationCancelParams < Orb::Internal::Type::BaseModel
6
+ extend Orb::Internal::Type::RequestParameters::Converter
7
+ include Orb::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Orb::MigrationCancelParams, Orb::Internal::AnyHash)
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :migration_id
16
+
17
+ sig do
18
+ params(
19
+ migration_id: String,
20
+ request_options: Orb::RequestOptions::OrHash
21
+ ).returns(T.attached_class)
22
+ end
23
+ def self.new(migration_id:, request_options: {})
24
+ end
25
+
26
+ sig do
27
+ override.returns(
28
+ { migration_id: String, request_options: Orb::RequestOptions }
29
+ )
30
+ end
31
+ def to_hash
32
+ end
33
+ end
34
+ end
35
+ end