orb-billing 1.46.0 → 1.47.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 (141) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -1
  3. data/README.md +1 -1
  4. data/lib/orb/models/invoice_issue_summary_response.rb +2 -1
  5. data/lib/orb/models/invoice_issued_summary_webhook_event.rb +5 -3
  6. data/lib/orb/models/invoice_list_summary_response.rb +2 -1
  7. data/lib/orb/models/metric_list_params.rb +21 -1
  8. data/lib/orb/models/metric_update_params.rb +17 -1
  9. data/lib/orb/models/plan_update_params.rb +9 -1
  10. data/lib/orb/models/plans/external_plan_id_update_params.rb +9 -1
  11. data/lib/orb/models/subscription_alert_disabled_webhook_event.rb +5 -9
  12. data/lib/orb/models/subscription_grouped_cost_exceeded_webhook_event.rb +5 -9
  13. data/lib/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rb +5 -9
  14. data/lib/orb/models/subscription_license_allocation_reset_webhook_event.rb +5 -9
  15. data/lib/orb/models/subscription_license_balance_threshold_reached_webhook_event.rb +5 -9
  16. data/lib/orb/models/webhook_endpoint.rb +28 -1
  17. data/lib/orb/models/webhook_endpoint_create_params.rb +22 -1
  18. data/lib/orb/models/webhook_endpoint_update_params.rb +22 -1
  19. data/lib/orb/models/webhook_endpoint_with_secret.rb +28 -1
  20. data/lib/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rb +5 -3
  21. data/lib/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rb +5 -3
  22. data/lib/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rb +5 -3
  23. data/lib/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rb +5 -3
  24. data/lib/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rb +5 -3
  25. data/lib/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rb +5 -3
  26. data/lib/orb/models/webhooks/invoice_edited_standard_webhook_event.rb +5 -3
  27. data/lib/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rb +5 -3
  28. data/lib/orb/models/webhooks/invoice_issued_standard_webhook_event.rb +5 -3
  29. data/lib/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rb +5 -3
  30. data/lib/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rb +5 -3
  31. data/lib/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rb +5 -3
  32. data/lib/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rb +5 -3
  33. data/lib/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rb +5 -3
  34. data/lib/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rb +5 -3
  35. data/lib/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rb +5 -3
  36. data/lib/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rb +5 -3
  37. data/lib/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rb +5 -3
  38. data/lib/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rb +5 -3
  39. data/lib/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rb +5 -3
  40. data/lib/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rb +7 -7
  41. data/lib/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rb +7 -7
  42. data/lib/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rb +5 -9
  43. data/lib/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rb +7 -7
  44. data/lib/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rb +7 -7
  45. data/lib/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rb +7 -7
  46. data/lib/orb/models/webhooks/subscription_created_standard_webhook_event.rb +7 -7
  47. data/lib/orb/models/webhooks/subscription_edited_standard_webhook_event.rb +7 -7
  48. data/lib/orb/models/webhooks/subscription_ended_standard_webhook_event.rb +7 -7
  49. data/lib/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rb +7 -7
  50. data/lib/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rb +5 -9
  51. data/lib/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rb +5 -9
  52. data/lib/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rb +5 -9
  53. data/lib/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rb +5 -9
  54. data/lib/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rb +7 -7
  55. data/lib/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rb +7 -7
  56. data/lib/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rb +7 -7
  57. data/lib/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rb +7 -7
  58. data/lib/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rb +7 -7
  59. data/lib/orb/models/webhooks/subscription_started_standard_webhook_event.rb +7 -7
  60. data/lib/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rb +7 -7
  61. data/lib/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rb +7 -7
  62. data/lib/orb/resources/metrics.rb +15 -5
  63. data/lib/orb/resources/plans/external_plan_id.rb +6 -3
  64. data/lib/orb/resources/plans.rb +6 -3
  65. data/lib/orb/resources/webhook_endpoints.rb +6 -2
  66. data/lib/orb/version.rb +1 -1
  67. data/rbi/orb/models/invoice_issue_summary_response.rbi +2 -1
  68. data/rbi/orb/models/invoice_issued_summary_webhook_event.rbi +6 -3
  69. data/rbi/orb/models/invoice_list_summary_response.rbi +2 -1
  70. data/rbi/orb/models/metric_list_params.rbi +29 -0
  71. data/rbi/orb/models/metric_update_params.rbi +16 -0
  72. data/rbi/orb/models/plan_update_params.rbi +8 -0
  73. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +8 -0
  74. data/rbi/orb/models/subscription_alert_disabled_webhook_event.rbi +6 -12
  75. data/rbi/orb/models/subscription_grouped_cost_exceeded_webhook_event.rbi +6 -12
  76. data/rbi/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rbi +6 -12
  77. data/rbi/orb/models/subscription_license_allocation_reset_webhook_event.rbi +6 -12
  78. data/rbi/orb/models/subscription_license_balance_threshold_reached_webhook_event.rbi +6 -12
  79. data/rbi/orb/models/webhook_endpoint.rbi +39 -0
  80. data/rbi/orb/models/webhook_endpoint_create_params.rbi +51 -0
  81. data/rbi/orb/models/webhook_endpoint_update_params.rbi +51 -0
  82. data/rbi/orb/models/webhook_endpoint_with_secret.rbi +50 -0
  83. data/rbi/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rbi +6 -3
  84. data/rbi/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rbi +6 -3
  85. data/rbi/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rbi +6 -3
  86. data/rbi/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rbi +6 -3
  87. data/rbi/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rbi +6 -3
  88. data/rbi/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rbi +6 -3
  89. data/rbi/orb/models/webhooks/invoice_edited_standard_webhook_event.rbi +6 -3
  90. data/rbi/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rbi +6 -3
  91. data/rbi/orb/models/webhooks/invoice_issued_standard_webhook_event.rbi +6 -3
  92. data/rbi/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rbi +6 -3
  93. data/rbi/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rbi +6 -3
  94. data/rbi/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rbi +6 -3
  95. data/rbi/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rbi +6 -3
  96. data/rbi/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rbi +6 -3
  97. data/rbi/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rbi +6 -3
  98. data/rbi/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rbi +6 -3
  99. data/rbi/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rbi +6 -3
  100. data/rbi/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rbi +6 -3
  101. data/rbi/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rbi +6 -3
  102. data/rbi/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rbi +6 -3
  103. data/rbi/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rbi +9 -9
  104. data/rbi/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rbi +9 -9
  105. data/rbi/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rbi +6 -12
  106. data/rbi/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rbi +9 -9
  107. data/rbi/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rbi +9 -9
  108. data/rbi/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rbi +9 -9
  109. data/rbi/orb/models/webhooks/subscription_created_standard_webhook_event.rbi +9 -9
  110. data/rbi/orb/models/webhooks/subscription_edited_standard_webhook_event.rbi +9 -9
  111. data/rbi/orb/models/webhooks/subscription_ended_standard_webhook_event.rbi +9 -9
  112. data/rbi/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rbi +9 -9
  113. data/rbi/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rbi +6 -12
  114. data/rbi/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rbi +6 -12
  115. data/rbi/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rbi +6 -12
  116. data/rbi/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rbi +6 -12
  117. data/rbi/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rbi +9 -9
  118. data/rbi/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rbi +9 -9
  119. data/rbi/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rbi +9 -9
  120. data/rbi/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rbi +9 -9
  121. data/rbi/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rbi +9 -9
  122. data/rbi/orb/models/webhooks/subscription_started_standard_webhook_event.rbi +9 -9
  123. data/rbi/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rbi +9 -9
  124. data/rbi/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rbi +9 -9
  125. data/rbi/orb/resources/metrics.rbi +16 -3
  126. data/rbi/orb/resources/plans/external_plan_id.rbi +6 -2
  127. data/rbi/orb/resources/plans.rbi +6 -2
  128. data/rbi/orb/resources/webhook_endpoints.rbi +10 -0
  129. data/sig/orb/models/metric_list_params.rbs +18 -1
  130. data/sig/orb/models/metric_update_params.rbs +14 -1
  131. data/sig/orb/models/plan_update_params.rbs +6 -1
  132. data/sig/orb/models/plans/external_plan_id_update_params.rbs +6 -1
  133. data/sig/orb/models/webhook_endpoint.rbs +16 -0
  134. data/sig/orb/models/webhook_endpoint_create_params.rbs +20 -1
  135. data/sig/orb/models/webhook_endpoint_update_params.rbs +16 -0
  136. data/sig/orb/models/webhook_endpoint_with_secret.rbs +16 -0
  137. data/sig/orb/resources/metrics.rbs +3 -0
  138. data/sig/orb/resources/plans/external_plan_id.rbs +1 -0
  139. data/sig/orb/resources/plans.rbs +1 -0
  140. data/sig/orb/resources/webhook_endpoints.rbs +2 -0
  141. metadata +1 -1
@@ -32,9 +32,9 @@ module Orb
32
32
  sig { returns(T.anything) }
33
33
  attr_accessor :properties
34
34
 
35
- # The subscription in a standard webhook payload: the fields readable without
36
- # to_subscription_params(), which every interval, billing period and plan phase
37
- # depends on.
35
+ # The subscription in a standard webhook payload: its own fields, with its plan
36
+ # and customer as references. Fetch the subscription for its price intervals,
37
+ # billing periods, plan phases and other derived fields.
38
38
  sig do
39
39
  returns(
40
40
  Orb::Webhooks::SubscriptionEndedStandardWebhookEvent::Subscription
@@ -81,9 +81,9 @@ module Orb
81
81
  # endpoint.
82
82
  payload_style:,
83
83
  properties:,
84
- # The subscription in a standard webhook payload: the fields readable without
85
- # to_subscription_params(), which every interval, billing period and plan phase
86
- # depends on.
84
+ # The subscription in a standard webhook payload: its own fields, with its plan
85
+ # and customer as references. Fetch the subscription for its price intervals,
86
+ # billing periods, plan phases and other derived fields.
87
87
  subscription:,
88
88
  # The event this payload describes.
89
89
  type:
@@ -210,9 +210,9 @@ module Orb
210
210
  end
211
211
  attr_accessor :status
212
212
 
213
- # The subscription in a standard webhook payload: the fields readable without
214
- # to_subscription_params(), which every interval, billing period and plan phase
215
- # depends on.
213
+ # The subscription in a standard webhook payload: its own fields, with its plan
214
+ # and customer as references. Fetch the subscription for its price intervals,
215
+ # billing periods, plan phases and other derived fields.
216
216
  sig do
217
217
  params(
218
218
  id: String,
@@ -44,9 +44,9 @@ module Orb
44
44
  end
45
45
  attr_writer :properties
46
46
 
47
- # The subscription in a standard webhook payload: the fields readable without
48
- # to_subscription_params(), which every interval, billing period and plan phase
49
- # depends on.
47
+ # The subscription in a standard webhook payload: its own fields, with its plan
48
+ # and customer as references. Fetch the subscription for its price intervals,
49
+ # billing periods, plan phases and other derived fields.
50
50
  sig do
51
51
  returns(
52
52
  Orb::Webhooks::SubscriptionFixedFeeQuantityUpdatedStandardWebhookEvent::Subscription
@@ -94,9 +94,9 @@ module Orb
94
94
  # endpoint.
95
95
  payload_style:,
96
96
  properties:,
97
- # The subscription in a standard webhook payload: the fields readable without
98
- # to_subscription_params(), which every interval, billing period and plan phase
99
- # depends on.
97
+ # The subscription in a standard webhook payload: its own fields, with its plan
98
+ # and customer as references. Fetch the subscription for its price intervals,
99
+ # billing periods, plan phases and other derived fields.
100
100
  subscription:,
101
101
  # The event this payload describes.
102
102
  type:
@@ -270,9 +270,9 @@ module Orb
270
270
  end
271
271
  attr_accessor :status
272
272
 
273
- # The subscription in a standard webhook payload: the fields readable without
274
- # to_subscription_params(), which every interval, billing period and plan phase
275
- # depends on.
273
+ # The subscription in a standard webhook payload: its own fields, with its plan
274
+ # and customer as references. Fetch the subscription for its price intervals,
275
+ # billing periods, plan phases and other derived fields.
276
276
  sig do
277
277
  params(
278
278
  id: String,
@@ -46,10 +46,8 @@ module Orb
46
46
  end
47
47
  attr_writer :properties
48
48
 
49
- # A lightweight subscription representation for webhook payloads.
50
- #
51
- # This avoids the expensive to_subscription_params() call required for full
52
- # serialization.
49
+ # The subscription in a license or grouped cost webhook payload: its status,
50
+ # dates, plan and customer.
53
51
  sig do
54
52
  returns(
55
53
  Orb::Webhooks::SubscriptionGroupedCostExceededStandardWebhookEvent::Subscription
@@ -99,10 +97,8 @@ module Orb
99
97
  # Every group that crossed a threshold for one alert, batched into a single
100
98
  # message.
101
99
  properties:,
102
- # A lightweight subscription representation for webhook payloads.
103
- #
104
- # This avoids the expensive to_subscription_params() call required for full
105
- # serialization.
100
+ # The subscription in a license or grouped cost webhook payload: its status,
101
+ # dates, plan and customer.
106
102
  subscription:,
107
103
  # The event this payload describes.
108
104
  type:
@@ -1155,10 +1151,8 @@ module Orb
1155
1151
  end
1156
1152
  attr_accessor :status
1157
1153
 
1158
- # A lightweight subscription representation for webhook payloads.
1159
- #
1160
- # This avoids the expensive to_subscription_params() call required for full
1161
- # serialization.
1154
+ # The subscription in a license or grouped cost webhook payload: its status,
1155
+ # dates, plan and customer.
1162
1156
  sig do
1163
1157
  params(
1164
1158
  id: String,
@@ -44,10 +44,8 @@ module Orb
44
44
  end
45
45
  attr_writer :properties
46
46
 
47
- # A lightweight subscription representation for webhook payloads.
48
- #
49
- # This avoids the expensive to_subscription_params() call required for full
50
- # serialization.
47
+ # The subscription in a license or grouped cost webhook payload: its status,
48
+ # dates, plan and customer.
51
49
  sig do
52
50
  returns(
53
51
  Orb::Webhooks::SubscriptionInvoicingThresholdExceededStandardWebhookEvent::Subscription
@@ -96,10 +94,8 @@ module Orb
96
94
  # endpoint.
97
95
  payload_style:,
98
96
  properties:,
99
- # A lightweight subscription representation for webhook payloads.
100
- #
101
- # This avoids the expensive to_subscription_params() call required for full
102
- # serialization.
97
+ # The subscription in a license or grouped cost webhook payload: its status,
98
+ # dates, plan and customer.
103
99
  subscription:,
104
100
  # The event this payload describes.
105
101
  type:
@@ -262,10 +258,8 @@ module Orb
262
258
  end
263
259
  attr_accessor :status
264
260
 
265
- # A lightweight subscription representation for webhook payloads.
266
- #
267
- # This avoids the expensive to_subscription_params() call required for full
268
- # serialization.
261
+ # The subscription in a license or grouped cost webhook payload: its status,
262
+ # dates, plan and customer.
269
263
  sig do
270
264
  params(
271
265
  id: String,
@@ -46,10 +46,8 @@ module Orb
46
46
  end
47
47
  attr_writer :properties
48
48
 
49
- # A lightweight subscription representation for webhook payloads.
50
- #
51
- # This avoids the expensive to_subscription_params() call required for full
52
- # serialization.
49
+ # The subscription in a license or grouped cost webhook payload: its status,
50
+ # dates, plan and customer.
53
51
  sig do
54
52
  returns(
55
53
  Orb::Webhooks::SubscriptionLicenseAllocationResetStandardWebhookEvent::Subscription
@@ -99,10 +97,8 @@ module Orb
99
97
  # Fires at the start of a billing period when license allocations are replenished.
100
98
  # Allocations sharing a billing period are batched into one message.
101
99
  properties:,
102
- # A lightweight subscription representation for webhook payloads.
103
- #
104
- # This avoids the expensive to_subscription_params() call required for full
105
- # serialization.
100
+ # The subscription in a license or grouped cost webhook payload: its status,
101
+ # dates, plan and customer.
106
102
  subscription:,
107
103
  # The event this payload describes.
108
104
  type:
@@ -311,10 +307,8 @@ module Orb
311
307
  end
312
308
  attr_accessor :status
313
309
 
314
- # A lightweight subscription representation for webhook payloads.
315
- #
316
- # This avoids the expensive to_subscription_params() call required for full
317
- # serialization.
310
+ # The subscription in a license or grouped cost webhook payload: its status,
311
+ # dates, plan and customer.
318
312
  sig do
319
313
  params(
320
314
  id: String,
@@ -46,10 +46,8 @@ module Orb
46
46
  end
47
47
  attr_writer :properties
48
48
 
49
- # A lightweight subscription representation for webhook payloads.
50
- #
51
- # This avoids the expensive to_subscription_params() call required for full
52
- # serialization.
49
+ # The subscription in a license or grouped cost webhook payload: its status,
50
+ # dates, plan and customer.
53
51
  sig do
54
52
  returns(
55
53
  Orb::Webhooks::SubscriptionLicenseBalanceThresholdReachedStandardWebhookEvent::Subscription
@@ -99,10 +97,8 @@ module Orb
99
97
  # Every license that crossed a threshold for one alert, batched into a single
100
98
  # message. For account-wide alerts the licenses may span several license types.
101
99
  properties:,
102
- # A lightweight subscription representation for webhook payloads.
103
- #
104
- # This avoids the expensive to_subscription_params() call required for full
105
- # serialization.
100
+ # The subscription in a license or grouped cost webhook payload: its status,
101
+ # dates, plan and customer.
106
102
  subscription:,
107
103
  # The event this payload describes.
108
104
  type:
@@ -1153,10 +1149,8 @@ module Orb
1153
1149
  end
1154
1150
  attr_accessor :status
1155
1151
 
1156
- # A lightweight subscription representation for webhook payloads.
1157
- #
1158
- # This avoids the expensive to_subscription_params() call required for full
1159
- # serialization.
1152
+ # The subscription in a license or grouped cost webhook payload: its status,
1153
+ # dates, plan and customer.
1160
1154
  sig do
1161
1155
  params(
1162
1156
  id: String,
@@ -44,9 +44,9 @@ module Orb
44
44
  end
45
45
  attr_writer :properties
46
46
 
47
- # The subscription in a standard webhook payload: the fields readable without
48
- # to_subscription_params(), which every interval, billing period and plan phase
49
- # depends on.
47
+ # The subscription in a standard webhook payload: its own fields, with its plan
48
+ # and customer as references. Fetch the subscription for its price intervals,
49
+ # billing periods, plan phases and other derived fields.
50
50
  sig do
51
51
  returns(
52
52
  Orb::Webhooks::SubscriptionPlanChangeScheduledStandardWebhookEvent::Subscription
@@ -94,9 +94,9 @@ module Orb
94
94
  # endpoint.
95
95
  payload_style:,
96
96
  properties:,
97
- # The subscription in a standard webhook payload: the fields readable without
98
- # to_subscription_params(), which every interval, billing period and plan phase
99
- # depends on.
97
+ # The subscription in a standard webhook payload: its own fields, with its plan
98
+ # and customer as references. Fetch the subscription for its price intervals,
99
+ # billing periods, plan phases and other derived fields.
100
100
  subscription:,
101
101
  # The event this payload describes.
102
102
  type:
@@ -265,9 +265,9 @@ module Orb
265
265
  end
266
266
  attr_accessor :status
267
267
 
268
- # The subscription in a standard webhook payload: the fields readable without
269
- # to_subscription_params(), which every interval, billing period and plan phase
270
- # depends on.
268
+ # The subscription in a standard webhook payload: its own fields, with its plan
269
+ # and customer as references. Fetch the subscription for its price intervals,
270
+ # billing periods, plan phases and other derived fields.
271
271
  sig do
272
272
  params(
273
273
  id: String,
@@ -44,9 +44,9 @@ module Orb
44
44
  end
45
45
  attr_writer :properties
46
46
 
47
- # The subscription in a standard webhook payload: the fields readable without
48
- # to_subscription_params(), which every interval, billing period and plan phase
49
- # depends on.
47
+ # The subscription in a standard webhook payload: its own fields, with its plan
48
+ # and customer as references. Fetch the subscription for its price intervals,
49
+ # billing periods, plan phases and other derived fields.
50
50
  sig do
51
51
  returns(
52
52
  Orb::Webhooks::SubscriptionPlanChangedStandardWebhookEvent::Subscription
@@ -94,9 +94,9 @@ module Orb
94
94
  # endpoint.
95
95
  payload_style:,
96
96
  properties:,
97
- # The subscription in a standard webhook payload: the fields readable without
98
- # to_subscription_params(), which every interval, billing period and plan phase
99
- # depends on.
97
+ # The subscription in a standard webhook payload: its own fields, with its plan
98
+ # and customer as references. Fetch the subscription for its price intervals,
99
+ # billing periods, plan phases and other derived fields.
100
100
  subscription:,
101
101
  # The event this payload describes.
102
102
  type:
@@ -245,9 +245,9 @@ module Orb
245
245
  end
246
246
  attr_accessor :status
247
247
 
248
- # The subscription in a standard webhook payload: the fields readable without
249
- # to_subscription_params(), which every interval, billing period and plan phase
250
- # depends on.
248
+ # The subscription in a standard webhook payload: its own fields, with its plan
249
+ # and customer as references. Fetch the subscription for its price intervals,
250
+ # billing periods, plan phases and other derived fields.
251
251
  sig do
252
252
  params(
253
253
  id: String,
@@ -44,9 +44,9 @@ module Orb
44
44
  end
45
45
  attr_writer :properties
46
46
 
47
- # The subscription in a standard webhook payload: the fields readable without
48
- # to_subscription_params(), which every interval, billing period and plan phase
49
- # depends on.
47
+ # The subscription in a standard webhook payload: its own fields, with its plan
48
+ # and customer as references. Fetch the subscription for its price intervals,
49
+ # billing periods, plan phases and other derived fields.
50
50
  sig do
51
51
  returns(
52
52
  Orb::Webhooks::SubscriptionPlanVersionChangeScheduledStandardWebhookEvent::Subscription
@@ -94,9 +94,9 @@ module Orb
94
94
  # endpoint.
95
95
  payload_style:,
96
96
  properties:,
97
- # The subscription in a standard webhook payload: the fields readable without
98
- # to_subscription_params(), which every interval, billing period and plan phase
99
- # depends on.
97
+ # The subscription in a standard webhook payload: its own fields, with its plan
98
+ # and customer as references. Fetch the subscription for its price intervals,
99
+ # billing periods, plan phases and other derived fields.
100
100
  subscription:,
101
101
  # The event this payload describes.
102
102
  type:
@@ -269,9 +269,9 @@ module Orb
269
269
  end
270
270
  attr_accessor :status
271
271
 
272
- # The subscription in a standard webhook payload: the fields readable without
273
- # to_subscription_params(), which every interval, billing period and plan phase
274
- # depends on.
272
+ # The subscription in a standard webhook payload: its own fields, with its plan
273
+ # and customer as references. Fetch the subscription for its price intervals,
274
+ # billing periods, plan phases and other derived fields.
275
275
  sig do
276
276
  params(
277
277
  id: String,
@@ -44,9 +44,9 @@ module Orb
44
44
  end
45
45
  attr_writer :properties
46
46
 
47
- # The subscription in a standard webhook payload: the fields readable without
48
- # to_subscription_params(), which every interval, billing period and plan phase
49
- # depends on.
47
+ # The subscription in a standard webhook payload: its own fields, with its plan
48
+ # and customer as references. Fetch the subscription for its price intervals,
49
+ # billing periods, plan phases and other derived fields.
50
50
  sig do
51
51
  returns(
52
52
  Orb::Webhooks::SubscriptionPlanVersionChangedStandardWebhookEvent::Subscription
@@ -94,9 +94,9 @@ module Orb
94
94
  # endpoint.
95
95
  payload_style:,
96
96
  properties:,
97
- # The subscription in a standard webhook payload: the fields readable without
98
- # to_subscription_params(), which every interval, billing period and plan phase
99
- # depends on.
97
+ # The subscription in a standard webhook payload: its own fields, with its plan
98
+ # and customer as references. Fetch the subscription for its price intervals,
99
+ # billing periods, plan phases and other derived fields.
100
100
  subscription:,
101
101
  # The event this payload describes.
102
102
  type:
@@ -269,9 +269,9 @@ module Orb
269
269
  end
270
270
  attr_accessor :status
271
271
 
272
- # The subscription in a standard webhook payload: the fields readable without
273
- # to_subscription_params(), which every interval, billing period and plan phase
274
- # depends on.
272
+ # The subscription in a standard webhook payload: its own fields, with its plan
273
+ # and customer as references. Fetch the subscription for its price intervals,
274
+ # billing periods, plan phases and other derived fields.
275
275
  sig do
276
276
  params(
277
277
  id: String,
@@ -44,9 +44,9 @@ module Orb
44
44
  end
45
45
  attr_writer :properties
46
46
 
47
- # The subscription in a standard webhook payload: the fields readable without
48
- # to_subscription_params(), which every interval, billing period and plan phase
49
- # depends on.
47
+ # The subscription in a standard webhook payload: its own fields, with its plan
48
+ # and customer as references. Fetch the subscription for its price intervals,
49
+ # billing periods, plan phases and other derived fields.
50
50
  sig do
51
51
  returns(
52
52
  Orb::Webhooks::SubscriptionSpendExceededStandardWebhookEvent::Subscription
@@ -95,9 +95,9 @@ module Orb
95
95
  # endpoint.
96
96
  payload_style:,
97
97
  properties:,
98
- # The subscription in a standard webhook payload: the fields readable without
99
- # to_subscription_params(), which every interval, billing period and plan phase
100
- # depends on.
98
+ # The subscription in a standard webhook payload: its own fields, with its plan
99
+ # and customer as references. Fetch the subscription for its price intervals,
100
+ # billing periods, plan phases and other derived fields.
101
101
  subscription:,
102
102
  # The event this payload describes.
103
103
  type:
@@ -1111,9 +1111,9 @@ module Orb
1111
1111
  end
1112
1112
  attr_accessor :status
1113
1113
 
1114
- # The subscription in a standard webhook payload: the fields readable without
1115
- # to_subscription_params(), which every interval, billing period and plan phase
1116
- # depends on.
1114
+ # The subscription in a standard webhook payload: its own fields, with its plan
1115
+ # and customer as references. Fetch the subscription for its price intervals,
1116
+ # billing periods, plan phases and other derived fields.
1117
1117
  sig do
1118
1118
  params(
1119
1119
  id: String,
@@ -32,9 +32,9 @@ module Orb
32
32
  sig { returns(T.anything) }
33
33
  attr_accessor :properties
34
34
 
35
- # The subscription in a standard webhook payload: the fields readable without
36
- # to_subscription_params(), which every interval, billing period and plan phase
37
- # depends on.
35
+ # The subscription in a standard webhook payload: its own fields, with its plan
36
+ # and customer as references. Fetch the subscription for its price intervals,
37
+ # billing periods, plan phases and other derived fields.
38
38
  sig do
39
39
  returns(
40
40
  Orb::Webhooks::SubscriptionStartedStandardWebhookEvent::Subscription
@@ -81,9 +81,9 @@ module Orb
81
81
  # endpoint.
82
82
  payload_style:,
83
83
  properties:,
84
- # The subscription in a standard webhook payload: the fields readable without
85
- # to_subscription_params(), which every interval, billing period and plan phase
86
- # depends on.
84
+ # The subscription in a standard webhook payload: its own fields, with its plan
85
+ # and customer as references. Fetch the subscription for its price intervals,
86
+ # billing periods, plan phases and other derived fields.
87
87
  subscription:,
88
88
  # The event this payload describes.
89
89
  type:
@@ -210,9 +210,9 @@ module Orb
210
210
  end
211
211
  attr_accessor :status
212
212
 
213
- # The subscription in a standard webhook payload: the fields readable without
214
- # to_subscription_params(), which every interval, billing period and plan phase
215
- # depends on.
213
+ # The subscription in a standard webhook payload: its own fields, with its plan
214
+ # and customer as references. Fetch the subscription for its price intervals,
215
+ # billing periods, plan phases and other derived fields.
216
216
  sig do
217
217
  params(
218
218
  id: String,
@@ -32,9 +32,9 @@ module Orb
32
32
  sig { returns(T.anything) }
33
33
  attr_accessor :properties
34
34
 
35
- # The subscription in a standard webhook payload: the fields readable without
36
- # to_subscription_params(), which every interval, billing period and plan phase
37
- # depends on.
35
+ # The subscription in a standard webhook payload: its own fields, with its plan
36
+ # and customer as references. Fetch the subscription for its price intervals,
37
+ # billing periods, plan phases and other derived fields.
38
38
  sig do
39
39
  returns(
40
40
  Orb::Webhooks::SubscriptionTrialEndedStandardWebhookEvent::Subscription
@@ -81,9 +81,9 @@ module Orb
81
81
  # endpoint.
82
82
  payload_style:,
83
83
  properties:,
84
- # The subscription in a standard webhook payload: the fields readable without
85
- # to_subscription_params(), which every interval, billing period and plan phase
86
- # depends on.
84
+ # The subscription in a standard webhook payload: its own fields, with its plan
85
+ # and customer as references. Fetch the subscription for its price intervals,
86
+ # billing periods, plan phases and other derived fields.
87
87
  subscription:,
88
88
  # The event this payload describes.
89
89
  type:
@@ -210,9 +210,9 @@ module Orb
210
210
  end
211
211
  attr_accessor :status
212
212
 
213
- # The subscription in a standard webhook payload: the fields readable without
214
- # to_subscription_params(), which every interval, billing period and plan phase
215
- # depends on.
213
+ # The subscription in a standard webhook payload: its own fields, with its plan
214
+ # and customer as references. Fetch the subscription for its price intervals,
215
+ # billing periods, plan phases and other derived fields.
216
216
  sig do
217
217
  params(
218
218
  id: String,
@@ -44,9 +44,9 @@ module Orb
44
44
  end
45
45
  attr_writer :properties
46
46
 
47
- # The subscription in a standard webhook payload: the fields readable without
48
- # to_subscription_params(), which every interval, billing period and plan phase
49
- # depends on.
47
+ # The subscription in a standard webhook payload: its own fields, with its plan
48
+ # and customer as references. Fetch the subscription for its price intervals,
49
+ # billing periods, plan phases and other derived fields.
50
50
  sig do
51
51
  returns(
52
52
  Orb::Webhooks::SubscriptionUsageExceededStandardWebhookEvent::Subscription
@@ -95,9 +95,9 @@ module Orb
95
95
  # endpoint.
96
96
  payload_style:,
97
97
  properties:,
98
- # The subscription in a standard webhook payload: the fields readable without
99
- # to_subscription_params(), which every interval, billing period and plan phase
100
- # depends on.
98
+ # The subscription in a standard webhook payload: its own fields, with its plan
99
+ # and customer as references. Fetch the subscription for its price intervals,
100
+ # billing periods, plan phases and other derived fields.
101
101
  subscription:,
102
102
  # The event this payload describes.
103
103
  type:
@@ -1117,9 +1117,9 @@ module Orb
1117
1117
  end
1118
1118
  attr_accessor :status
1119
1119
 
1120
- # The subscription in a standard webhook payload: the fields readable without
1121
- # to_subscription_params(), which every interval, billing period and plan phase
1122
- # depends on.
1120
+ # The subscription in a standard webhook payload: its own fields, with its plan
1121
+ # and customer as references. Fetch the subscription for its price intervals,
1122
+ # billing periods, plan phases and other derived fields.
1123
1123
  sig do
1124
1124
  params(
1125
1125
  id: String,
@@ -36,28 +36,38 @@ module Orb
36
36
  )
37
37
  end
38
38
 
39
- # This endpoint allows you to update the `metadata` property on a metric. If you
40
- # pass `null` for the metadata value, it will clear any existing metadata for that
41
- # invoice.
39
+ # This endpoint allows you to update the `name`, `description`, and `metadata`
40
+ # properties on a metric. Fields left out of the request are not changed, and
41
+ # `name` cannot be empty. If you pass `null` for the metadata value, it will clear
42
+ # any existing metadata for that metric.
42
43
  sig do
43
44
  params(
44
45
  metric_id: String,
46
+ description: T.nilable(String),
45
47
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
48
+ name: T.nilable(String),
46
49
  request_options: Orb::RequestOptions::OrHash
47
50
  ).returns(Orb::BillableMetric)
48
51
  end
49
52
  def update(
50
53
  metric_id,
54
+ # A description of the metric.
55
+ description: nil,
51
56
  # User-specified key/value pairs for the resource. Individual keys can be removed
52
57
  # by setting the value to `null`, and the entire metadata mapping can be cleared
53
58
  # by setting `metadata` to `null`.
54
59
  metadata: nil,
60
+ # The name of the metric.
61
+ name: nil,
55
62
  request_options: {}
56
63
  )
57
64
  end
58
65
 
59
66
  # This endpoint is used to list [metrics](/core-concepts#metric). It returns
60
67
  # information about the metrics including its name, description, and item.
68
+ #
69
+ # Pass `status` to only return metrics with that status, e.g. `status=active` to
70
+ # leave out archived metrics.
61
71
  sig do
62
72
  params(
63
73
  created_at_gt: T.nilable(Time),
@@ -66,6 +76,7 @@ module Orb
66
76
  created_at_lte: T.nilable(Time),
67
77
  cursor: T.nilable(String),
68
78
  limit: Integer,
79
+ status: T.nilable(Orb::MetricListParams::Status::OrSymbol),
69
80
  request_options: Orb::RequestOptions::OrHash
70
81
  ).returns(Orb::Internal::Page[Orb::BillableMetric])
71
82
  end
@@ -79,6 +90,8 @@ module Orb
79
90
  cursor: nil,
80
91
  # The number of items to fetch. Defaults to 20.
81
92
  limit: nil,
93
+ # The metric status to filter to ('active', 'archived', or 'draft').
94
+ status: nil,
82
95
  request_options: {}
83
96
  )
84
97
  end