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
@@ -29,9 +29,9 @@ module Orb
29
29
  required :properties, Orb::Internal::Type::Unknown
30
30
 
31
31
  # @!attribute subscription
32
- # The subscription in a standard webhook payload: the fields readable without
33
- # to_subscription_params(), which every interval, billing period and plan phase
34
- # depends on.
32
+ # The subscription in a standard webhook payload: its own fields, with its plan
33
+ # and customer as references. Fetch the subscription for its price intervals,
34
+ # billing periods, plan phases and other derived fields.
35
35
  #
36
36
  # @return [Orb::Models::Webhooks::SubscriptionStartedStandardWebhookEvent::Subscription]
37
37
  required :subscription, -> { Orb::Webhooks::SubscriptionStartedStandardWebhookEvent::Subscription }
@@ -57,7 +57,7 @@ module Orb
57
57
  #
58
58
  # @param properties [Object]
59
59
  #
60
- # @param subscription [Orb::Models::Webhooks::SubscriptionStartedStandardWebhookEvent::Subscription] The subscription in a standard webhook payload: the fields readable without
60
+ # @param subscription [Orb::Models::Webhooks::SubscriptionStartedStandardWebhookEvent::Subscription] The subscription in a standard webhook payload: its own fields, with its plan an
61
61
  #
62
62
  # @param type [Symbol, Orb::Models::Webhooks::SubscriptionStartedStandardWebhookEvent::Type] The event this payload describes.
63
63
 
@@ -137,9 +137,9 @@ module Orb
137
137
  # {Orb::Models::Webhooks::SubscriptionStartedStandardWebhookEvent::Subscription}
138
138
  # for more details.
139
139
  #
140
- # The subscription in a standard webhook payload: the fields readable without
141
- # to_subscription_params(), which every interval, billing period and plan phase
142
- # depends on.
140
+ # The subscription in a standard webhook payload: its own fields, with its plan
141
+ # and customer as references. Fetch the subscription for its price intervals,
142
+ # billing periods, plan phases and other derived fields.
143
143
  #
144
144
  # @param id [String]
145
145
  #
@@ -30,9 +30,9 @@ module Orb
30
30
  required :properties, Orb::Internal::Type::Unknown
31
31
 
32
32
  # @!attribute subscription
33
- # The subscription in a standard webhook payload: the fields readable without
34
- # to_subscription_params(), which every interval, billing period and plan phase
35
- # depends on.
33
+ # The subscription in a standard webhook payload: its own fields, with its plan
34
+ # and customer as references. Fetch the subscription for its price intervals,
35
+ # billing periods, plan phases and other derived fields.
36
36
  #
37
37
  # @return [Orb::Models::Webhooks::SubscriptionTrialEndedStandardWebhookEvent::Subscription]
38
38
  required :subscription, -> { Orb::Webhooks::SubscriptionTrialEndedStandardWebhookEvent::Subscription }
@@ -58,7 +58,7 @@ module Orb
58
58
  #
59
59
  # @param properties [Object]
60
60
  #
61
- # @param subscription [Orb::Models::Webhooks::SubscriptionTrialEndedStandardWebhookEvent::Subscription] The subscription in a standard webhook payload: the fields readable without
61
+ # @param subscription [Orb::Models::Webhooks::SubscriptionTrialEndedStandardWebhookEvent::Subscription] The subscription in a standard webhook payload: its own fields, with its plan an
62
62
  #
63
63
  # @param type [Symbol, Orb::Models::Webhooks::SubscriptionTrialEndedStandardWebhookEvent::Type] The event this payload describes.
64
64
 
@@ -138,9 +138,9 @@ module Orb
138
138
  # {Orb::Models::Webhooks::SubscriptionTrialEndedStandardWebhookEvent::Subscription}
139
139
  # for more details.
140
140
  #
141
- # The subscription in a standard webhook payload: the fields readable without
142
- # to_subscription_params(), which every interval, billing period and plan phase
143
- # depends on.
141
+ # The subscription in a standard webhook payload: its own fields, with its plan
142
+ # and customer as references. Fetch the subscription for its price intervals,
143
+ # billing periods, plan phases and other derived fields.
144
144
  #
145
145
  # @param id [String]
146
146
  #
@@ -30,9 +30,9 @@ module Orb
30
30
  required :properties, -> { Orb::Webhooks::SubscriptionUsageExceededStandardWebhookEvent::Properties }
31
31
 
32
32
  # @!attribute subscription
33
- # The subscription in a standard webhook payload: the fields readable without
34
- # to_subscription_params(), which every interval, billing period and plan phase
35
- # depends on.
33
+ # The subscription in a standard webhook payload: its own fields, with its plan
34
+ # and customer as references. Fetch the subscription for its price intervals,
35
+ # billing periods, plan phases and other derived fields.
36
36
  #
37
37
  # @return [Orb::Models::Webhooks::SubscriptionUsageExceededStandardWebhookEvent::Subscription]
38
38
  required :subscription, -> { Orb::Webhooks::SubscriptionUsageExceededStandardWebhookEvent::Subscription }
@@ -59,7 +59,7 @@ module Orb
59
59
  #
60
60
  # @param properties [Orb::Models::Webhooks::SubscriptionUsageExceededStandardWebhookEvent::Properties]
61
61
  #
62
- # @param subscription [Orb::Models::Webhooks::SubscriptionUsageExceededStandardWebhookEvent::Subscription] The subscription in a standard webhook payload: the fields readable without
62
+ # @param subscription [Orb::Models::Webhooks::SubscriptionUsageExceededStandardWebhookEvent::Subscription] The subscription in a standard webhook payload: its own fields, with its plan an
63
63
  #
64
64
  # @param type [Symbol, Orb::Models::Webhooks::SubscriptionUsageExceededStandardWebhookEvent::Type] The event this payload describes.
65
65
 
@@ -616,9 +616,9 @@ module Orb
616
616
  # {Orb::Models::Webhooks::SubscriptionUsageExceededStandardWebhookEvent::Subscription}
617
617
  # for more details.
618
618
  #
619
- # The subscription in a standard webhook payload: the fields readable without
620
- # to_subscription_params(), which every interval, billing period and plan phase
621
- # depends on.
619
+ # The subscription in a standard webhook payload: its own fields, with its plan
620
+ # and customer as references. Fetch the subscription for its price intervals,
621
+ # billing periods, plan phases and other derived fields.
622
622
  #
623
623
  # @param id [String]
624
624
  #
@@ -44,16 +44,21 @@ module Orb
44
44
  # Some parameter documentations has been truncated, see
45
45
  # {Orb::Models::MetricUpdateParams} for more details.
46
46
  #
47
- # This endpoint allows you to update the `metadata` property on a metric. If you
48
- # pass `null` for the metadata value, it will clear any existing metadata for that
49
- # invoice.
47
+ # This endpoint allows you to update the `name`, `description`, and `metadata`
48
+ # properties on a metric. Fields left out of the request are not changed, and
49
+ # `name` cannot be empty. If you pass `null` for the metadata value, it will clear
50
+ # any existing metadata for that metric.
50
51
  #
51
- # @overload update(metric_id, metadata: nil, request_options: {})
52
+ # @overload update(metric_id, description: nil, metadata: nil, name: nil, request_options: {})
52
53
  #
53
54
  # @param metric_id [String]
54
55
  #
56
+ # @param description [String, nil] A description of the metric.
57
+ #
55
58
  # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
56
59
  #
60
+ # @param name [String, nil] The name of the metric.
61
+ #
57
62
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
58
63
  #
59
64
  # @return [Orb::Models::BillableMetric]
@@ -76,7 +81,10 @@ module Orb
76
81
  # This endpoint is used to list [metrics](/core-concepts#metric). It returns
77
82
  # information about the metrics including its name, description, and item.
78
83
  #
79
- # @overload list(created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, cursor: nil, limit: nil, request_options: {})
84
+ # Pass `status` to only return metrics with that status, e.g. `status=active` to
85
+ # leave out archived metrics.
86
+ #
87
+ # @overload list(created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, cursor: nil, limit: nil, status: nil, request_options: {})
80
88
  #
81
89
  # @param created_at_gt [Time, nil]
82
90
  #
@@ -90,6 +98,8 @@ module Orb
90
98
  #
91
99
  # @param limit [Integer] The number of items to fetch. Defaults to 20.
92
100
  #
101
+ # @param status [Symbol, Orb::Models::MetricListParams::Status, nil] The metric status to filter to ('active', 'archived', or 'draft').
102
+ #
93
103
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
94
104
  #
95
105
  # @return [Orb::Internal::Page<Orb::Models::BillableMetric>]
@@ -11,12 +11,13 @@ module Orb
11
11
  # Some parameter documentations has been truncated, see
12
12
  # {Orb::Models::Plans::ExternalPlanIDUpdateParams} for more details.
13
13
  #
14
- # This endpoint can be used to update the `external_plan_id`, `description`, and
15
- # `metadata` of an existing plan.
14
+ # This endpoint can be used to update the `name`, `external_plan_id`,
15
+ # `description`, and `metadata` of an existing plan. A plan's `name` cannot be
16
+ # empty.
16
17
  #
17
18
  # Other fields on a plan are currently immutable.
18
19
  #
19
- # @overload update(other_external_plan_id, description: nil, external_plan_id: nil, metadata: nil, request_options: {})
20
+ # @overload update(other_external_plan_id, description: nil, external_plan_id: nil, metadata: nil, name: nil, request_options: {})
20
21
  #
21
22
  # @param other_external_plan_id [String]
22
23
  #
@@ -26,6 +27,8 @@ module Orb
26
27
  #
27
28
  # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
28
29
  #
30
+ # @param name [String, nil] The name of the plan.
31
+ #
29
32
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
30
33
  #
31
34
  # @return [Orb::Models::Plan]
@@ -63,12 +63,13 @@ module Orb
63
63
  # Some parameter documentations has been truncated, see
64
64
  # {Orb::Models::PlanUpdateParams} for more details.
65
65
  #
66
- # This endpoint can be used to update the `external_plan_id`, `description`, and
67
- # `metadata` of an existing plan.
66
+ # This endpoint can be used to update the `name`, `external_plan_id`,
67
+ # `description`, and `metadata` of an existing plan. A plan's `name` cannot be
68
+ # empty.
68
69
  #
69
70
  # Other fields on a plan are currently immutable.
70
71
  #
71
- # @overload update(plan_id, description: nil, external_plan_id: nil, metadata: nil, request_options: {})
72
+ # @overload update(plan_id, description: nil, external_plan_id: nil, metadata: nil, name: nil, request_options: {})
72
73
  #
73
74
  # @param plan_id [String]
74
75
  #
@@ -78,6 +79,8 @@ module Orb
78
79
  #
79
80
  # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
80
81
  #
82
+ # @param name [String, nil] The name of the plan.
83
+ #
81
84
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
82
85
  #
83
86
  # @return [Orb::Models::Plan]
@@ -12,12 +12,14 @@ module Orb
12
12
  # webhook events. The secret isn't returned by any other endpoint. An account can
13
13
  # have at most 20 webhook endpoints by default.
14
14
  #
15
- # @overload create(url:, enabled_event_types: nil, request_options: {})
15
+ # @overload create(url:, enabled_event_types: nil, payload_style: nil, request_options: {})
16
16
  #
17
17
  # @param url [String] The HTTPS URL that Orb sends webhook events to.
18
18
  #
19
19
  # @param enabled_event_types [Array<String>, nil] The webhook event types to send to this endpoint. If omitted or null, all event
20
20
  #
21
+ # @param payload_style [Symbol, Orb::Models::WebhookEndpointCreateParams::PayloadStyle, nil] The payload style of the webhook events sent to this endpoint. If omitted or nul
22
+ #
21
23
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
22
24
  #
23
25
  # @return [Orb::Models::WebhookEndpointWithSecret]
@@ -58,12 +60,14 @@ module Orb
58
60
  #
59
61
  # This endpoint updates a webhook endpoint's URL or the event types sent to it.
60
62
  #
61
- # @overload update(webhook_endpoint_id, enabled_event_types: nil, url: nil, request_options: {})
63
+ # @overload update(webhook_endpoint_id, enabled_event_types: nil, payload_style: nil, url: nil, request_options: {})
62
64
  #
63
65
  # @param webhook_endpoint_id [String]
64
66
  #
65
67
  # @param enabled_event_types [Array<String>, nil] The webhook event types to send to this endpoint. Null sends all event types; om
66
68
  #
69
+ # @param payload_style [Symbol, Orb::Models::WebhookEndpointUpdateParams::PayloadStyle, nil] The payload style of the webhook events sent to this endpoint. Applies to events
70
+ #
67
71
  # @param url [String, nil] The HTTPS URL that Orb sends webhook events to.
68
72
  #
69
73
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
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.46.0"
4
+ VERSION = "1.47.0"
5
5
  end
@@ -358,7 +358,8 @@ module Orb
358
358
  sig { returns(T::Boolean) }
359
359
  attr_accessor :will_auto_issue
360
360
 
361
- # #InvoiceApiResourceWithoutLineItems
361
+ # An invoice without its line items, subtotal, discounts, minimums or maximums.
362
+ # Fetch the invoice for those.
362
363
  sig do
363
364
  params(
364
365
  id: String,
@@ -16,7 +16,8 @@ module Orb
16
16
  sig { returns(Time) }
17
17
  attr_accessor :created_at
18
18
 
19
- # #InvoiceApiResourceWithoutLineItems
19
+ # An invoice without its line items, subtotal, discounts, minimums or maximums.
20
+ # Fetch the invoice for those.
20
21
  sig { returns(Orb::InvoiceIssuedSummaryWebhookEvent::Invoice) }
21
22
  attr_reader :invoice
22
23
 
@@ -68,7 +69,8 @@ module Orb
68
69
  id:,
69
70
  # The time at which this event was created, to the second.
70
71
  created_at:,
71
- # #InvoiceApiResourceWithoutLineItems
72
+ # An invoice without its line items, subtotal, discounts, minimums or maximums.
73
+ # Fetch the invoice for those.
72
74
  invoice:,
73
75
  # The serialization style this payload was rendered in, as configured on the
74
76
  # endpoint.
@@ -463,7 +465,8 @@ module Orb
463
465
  sig { returns(T::Boolean) }
464
466
  attr_accessor :will_auto_issue
465
467
 
466
- # #InvoiceApiResourceWithoutLineItems
468
+ # An invoice without its line items, subtotal, discounts, minimums or maximums.
469
+ # Fetch the invoice for those.
467
470
  sig do
468
471
  params(
469
472
  id: String,
@@ -355,7 +355,8 @@ module Orb
355
355
  sig { returns(T::Boolean) }
356
356
  attr_accessor :will_auto_issue
357
357
 
358
- # #InvoiceApiResourceWithoutLineItems
358
+ # An invoice without its line items, subtotal, discounts, minimums or maximums.
359
+ # Fetch the invoice for those.
359
360
  sig do
360
361
  params(
361
362
  id: String,
@@ -33,6 +33,10 @@ module Orb
33
33
  sig { params(limit: Integer).void }
34
34
  attr_writer :limit
35
35
 
36
+ # The metric status to filter to ('active', 'archived', or 'draft').
37
+ sig { returns(T.nilable(Orb::MetricListParams::Status::OrSymbol)) }
38
+ attr_accessor :status
39
+
36
40
  sig do
37
41
  params(
38
42
  created_at_gt: T.nilable(Time),
@@ -41,6 +45,7 @@ module Orb
41
45
  created_at_lte: T.nilable(Time),
42
46
  cursor: T.nilable(String),
43
47
  limit: Integer,
48
+ status: T.nilable(Orb::MetricListParams::Status::OrSymbol),
44
49
  request_options: Orb::RequestOptions::OrHash
45
50
  ).returns(T.attached_class)
46
51
  end
@@ -54,6 +59,8 @@ module Orb
54
59
  cursor: nil,
55
60
  # The number of items to fetch. Defaults to 20.
56
61
  limit: nil,
62
+ # The metric status to filter to ('active', 'archived', or 'draft').
63
+ status: nil,
57
64
  request_options: {}
58
65
  )
59
66
  end
@@ -67,12 +74,34 @@ module Orb
67
74
  created_at_lte: T.nilable(Time),
68
75
  cursor: T.nilable(String),
69
76
  limit: Integer,
77
+ status: T.nilable(Orb::MetricListParams::Status::OrSymbol),
70
78
  request_options: Orb::RequestOptions
71
79
  }
72
80
  )
73
81
  end
74
82
  def to_hash
75
83
  end
84
+
85
+ # The metric status to filter to ('active', 'archived', or 'draft').
86
+ module Status
87
+ extend Orb::Internal::Type::Enum
88
+
89
+ TaggedSymbol =
90
+ T.type_alias { T.all(Symbol, Orb::MetricListParams::Status) }
91
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
92
+
93
+ ACTIVE = T.let(:active, Orb::MetricListParams::Status::TaggedSymbol)
94
+ ARCHIVED = T.let(:archived, Orb::MetricListParams::Status::TaggedSymbol)
95
+ DRAFT = T.let(:draft, Orb::MetricListParams::Status::TaggedSymbol)
96
+
97
+ sig do
98
+ override.returns(
99
+ T::Array[Orb::MetricListParams::Status::TaggedSymbol]
100
+ )
101
+ end
102
+ def self.values
103
+ end
104
+ end
76
105
  end
77
106
  end
78
107
  end
@@ -12,25 +12,39 @@ module Orb
12
12
  sig { returns(String) }
13
13
  attr_accessor :metric_id
14
14
 
15
+ # A description of the metric.
16
+ sig { returns(T.nilable(String)) }
17
+ attr_accessor :description
18
+
15
19
  # User-specified key/value pairs for the resource. Individual keys can be removed
16
20
  # by setting the value to `null`, and the entire metadata mapping can be cleared
17
21
  # by setting `metadata` to `null`.
18
22
  sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
19
23
  attr_accessor :metadata
20
24
 
25
+ # The name of the metric.
26
+ sig { returns(T.nilable(String)) }
27
+ attr_accessor :name
28
+
21
29
  sig do
22
30
  params(
23
31
  metric_id: String,
32
+ description: T.nilable(String),
24
33
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
34
+ name: T.nilable(String),
25
35
  request_options: Orb::RequestOptions::OrHash
26
36
  ).returns(T.attached_class)
27
37
  end
28
38
  def self.new(
29
39
  metric_id:,
40
+ # A description of the metric.
41
+ description: nil,
30
42
  # User-specified key/value pairs for the resource. Individual keys can be removed
31
43
  # by setting the value to `null`, and the entire metadata mapping can be cleared
32
44
  # by setting `metadata` to `null`.
33
45
  metadata: nil,
46
+ # The name of the metric.
47
+ name: nil,
34
48
  request_options: {}
35
49
  )
36
50
  end
@@ -39,7 +53,9 @@ module Orb
39
53
  override.returns(
40
54
  {
41
55
  metric_id: String,
56
+ description: T.nilable(String),
42
57
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
58
+ name: T.nilable(String),
43
59
  request_options: Orb::RequestOptions
44
60
  }
45
61
  )
@@ -28,12 +28,17 @@ module Orb
28
28
  sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
29
29
  attr_accessor :metadata
30
30
 
31
+ # The name of the plan.
32
+ sig { returns(T.nilable(String)) }
33
+ attr_accessor :name
34
+
31
35
  sig do
32
36
  params(
33
37
  plan_id: String,
34
38
  description: T.nilable(String),
35
39
  external_plan_id: T.nilable(String),
36
40
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
41
+ name: T.nilable(String),
37
42
  request_options: Orb::RequestOptions::OrHash
38
43
  ).returns(T.attached_class)
39
44
  end
@@ -49,6 +54,8 @@ module Orb
49
54
  # by setting the value to `null`, and the entire metadata mapping can be cleared
50
55
  # by setting `metadata` to `null`.
51
56
  metadata: nil,
57
+ # The name of the plan.
58
+ name: nil,
52
59
  request_options: {}
53
60
  )
54
61
  end
@@ -60,6 +67,7 @@ module Orb
60
67
  description: T.nilable(String),
61
68
  external_plan_id: T.nilable(String),
62
69
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
70
+ name: T.nilable(String),
63
71
  request_options: Orb::RequestOptions
64
72
  }
65
73
  )
@@ -34,12 +34,17 @@ module Orb
34
34
  sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
35
35
  attr_accessor :metadata
36
36
 
37
+ # The name of the plan.
38
+ sig { returns(T.nilable(String)) }
39
+ attr_accessor :name
40
+
37
41
  sig do
38
42
  params(
39
43
  other_external_plan_id: String,
40
44
  description: T.nilable(String),
41
45
  external_plan_id: T.nilable(String),
42
46
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
47
+ name: T.nilable(String),
43
48
  request_options: Orb::RequestOptions::OrHash
44
49
  ).returns(T.attached_class)
45
50
  end
@@ -55,6 +60,8 @@ module Orb
55
60
  # by setting the value to `null`, and the entire metadata mapping can be cleared
56
61
  # by setting `metadata` to `null`.
57
62
  metadata: nil,
63
+ # The name of the plan.
64
+ name: nil,
58
65
  request_options: {}
59
66
  )
60
67
  end
@@ -66,6 +73,7 @@ module Orb
66
73
  description: T.nilable(String),
67
74
  external_plan_id: T.nilable(String),
68
75
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
76
+ name: T.nilable(String),
69
77
  request_options: Orb::RequestOptions
70
78
  }
71
79
  )
@@ -41,10 +41,8 @@ module Orb
41
41
  end
42
42
  attr_writer :properties
43
43
 
44
- # A lightweight subscription representation for webhook payloads.
45
- #
46
- # This avoids the expensive to_subscription_params() call required for full
47
- # serialization.
44
+ # The subscription in a license or grouped cost webhook payload: its status,
45
+ # dates, plan and customer.
48
46
  sig { returns(Orb::SubscriptionAlertDisabledWebhookEvent::Subscription) }
49
47
  attr_reader :subscription
50
48
 
@@ -87,10 +85,8 @@ module Orb
87
85
  # Sent when the system disables an alert on its own, currently for
88
86
  # cardinality-limit enforcement on grouped cost alerts.
89
87
  properties:,
90
- # A lightweight subscription representation for webhook payloads.
91
- #
92
- # This avoids the expensive to_subscription_params() call required for full
93
- # serialization.
88
+ # The subscription in a license or grouped cost webhook payload: its status,
89
+ # dates, plan and customer.
94
90
  subscription:,
95
91
  # The event this payload describes.
96
92
  type:
@@ -1122,10 +1118,8 @@ module Orb
1122
1118
  end
1123
1119
  attr_accessor :status
1124
1120
 
1125
- # A lightweight subscription representation for webhook payloads.
1126
- #
1127
- # This avoids the expensive to_subscription_params() call required for full
1128
- # serialization.
1121
+ # The subscription in a license or grouped cost webhook payload: its status,
1122
+ # dates, plan and customer.
1129
1123
  sig do
1130
1124
  params(
1131
1125
  id: String,
@@ -43,10 +43,8 @@ module Orb
43
43
  end
44
44
  attr_writer :properties
45
45
 
46
- # A lightweight subscription representation for webhook payloads.
47
- #
48
- # This avoids the expensive to_subscription_params() call required for full
49
- # serialization.
46
+ # The subscription in a license or grouped cost webhook payload: its status,
47
+ # dates, plan and customer.
50
48
  sig do
51
49
  returns(Orb::SubscriptionGroupedCostExceededWebhookEvent::Subscription)
52
50
  end
@@ -93,10 +91,8 @@ module Orb
93
91
  # Every group that crossed a threshold for one alert, batched into a single
94
92
  # message.
95
93
  properties:,
96
- # A lightweight subscription representation for webhook payloads.
97
- #
98
- # This avoids the expensive to_subscription_params() call required for full
99
- # serialization.
94
+ # The subscription in a license or grouped cost webhook payload: its status,
95
+ # dates, plan and customer.
100
96
  subscription:,
101
97
  # The event this payload describes.
102
98
  type:
@@ -1149,10 +1145,8 @@ module Orb
1149
1145
  end
1150
1146
  attr_accessor :status
1151
1147
 
1152
- # A lightweight subscription representation for webhook payloads.
1153
- #
1154
- # This avoids the expensive to_subscription_params() call required for full
1155
- # serialization.
1148
+ # The subscription in a license or grouped cost webhook payload: its status,
1149
+ # dates, plan and customer.
1156
1150
  sig do
1157
1151
  params(
1158
1152
  id: String,
@@ -43,10 +43,8 @@ module Orb
43
43
  end
44
44
  attr_writer :properties
45
45
 
46
- # A lightweight subscription representation for webhook payloads.
47
- #
48
- # This avoids the expensive to_subscription_params() call required for full
49
- # serialization.
46
+ # The subscription in a license or grouped cost webhook payload: its status,
47
+ # dates, plan and customer.
50
48
  sig do
51
49
  returns(
52
50
  Orb::SubscriptionInvoicingThresholdExceededWebhookEvent::Subscription
@@ -95,10 +93,8 @@ module Orb
95
93
  # endpoint.
96
94
  payload_style:,
97
95
  properties:,
98
- # A lightweight subscription representation for webhook payloads.
99
- #
100
- # This avoids the expensive to_subscription_params() call required for full
101
- # serialization.
96
+ # The subscription in a license or grouped cost webhook payload: its status,
97
+ # dates, plan and customer.
102
98
  subscription:,
103
99
  # The event this payload describes.
104
100
  type:
@@ -261,10 +257,8 @@ module Orb
261
257
  end
262
258
  attr_accessor :status
263
259
 
264
- # A lightweight subscription representation for webhook payloads.
265
- #
266
- # This avoids the expensive to_subscription_params() call required for full
267
- # serialization.
260
+ # The subscription in a license or grouped cost webhook payload: its status,
261
+ # dates, plan and customer.
268
262
  sig do
269
263
  params(
270
264
  id: String,
@@ -43,10 +43,8 @@ module Orb
43
43
  end
44
44
  attr_writer :properties
45
45
 
46
- # A lightweight subscription representation for webhook payloads.
47
- #
48
- # This avoids the expensive to_subscription_params() call required for full
49
- # serialization.
46
+ # The subscription in a license or grouped cost webhook payload: its status,
47
+ # dates, plan and customer.
50
48
  sig do
51
49
  returns(
52
50
  Orb::SubscriptionLicenseAllocationResetWebhookEvent::Subscription
@@ -96,10 +94,8 @@ module Orb
96
94
  # Fires at the start of a billing period when license allocations are replenished.
97
95
  # Allocations sharing a billing period are batched into one message.
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:
@@ -308,10 +304,8 @@ module Orb
308
304
  end
309
305
  attr_accessor :status
310
306
 
311
- # A lightweight subscription representation for webhook payloads.
312
- #
313
- # This avoids the expensive to_subscription_params() call required for full
314
- # serialization.
307
+ # The subscription in a license or grouped cost webhook payload: its status,
308
+ # dates, plan and customer.
315
309
  sig do
316
310
  params(
317
311
  id: String,