orb-billing 1.46.0 → 1.48.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -1
- data/README.md +1 -1
- data/lib/orb/models/credit_block_update_params.rb +34 -0
- data/lib/orb/models/credit_block_update_response.rb +332 -0
- data/lib/orb/models/invoice_issue_summary_response.rb +2 -1
- data/lib/orb/models/invoice_issued_summary_webhook_event.rb +5 -3
- data/lib/orb/models/invoice_list_summary_response.rb +2 -1
- data/lib/orb/models/metric_archive_params.rb +20 -0
- data/lib/orb/models/metric_list_params.rb +21 -1
- data/lib/orb/models/metric_unarchive_params.rb +20 -0
- data/lib/orb/models/metric_update_params.rb +17 -1
- data/lib/orb/models/plan_update_params.rb +9 -1
- data/lib/orb/models/plans/external_plan_id_update_params.rb +9 -1
- data/lib/orb/models/subscription_alert_disabled_webhook_event.rb +5 -9
- data/lib/orb/models/subscription_grouped_cost_exceeded_webhook_event.rb +5 -9
- data/lib/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rb +5 -9
- data/lib/orb/models/subscription_license_allocation_reset_webhook_event.rb +5 -9
- data/lib/orb/models/subscription_license_balance_threshold_reached_webhook_event.rb +5 -9
- data/lib/orb/models/webhook_endpoint.rb +28 -1
- data/lib/orb/models/webhook_endpoint_create_params.rb +22 -1
- data/lib/orb/models/webhook_endpoint_update_params.rb +22 -1
- data/lib/orb/models/webhook_endpoint_with_secret.rb +28 -1
- data/lib/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rb +5 -3
- data/lib/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rb +5 -3
- data/lib/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rb +5 -3
- data/lib/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rb +5 -3
- data/lib/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rb +5 -3
- data/lib/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rb +5 -3
- data/lib/orb/models/webhooks/invoice_edited_standard_webhook_event.rb +5 -3
- data/lib/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rb +5 -3
- data/lib/orb/models/webhooks/invoice_issued_standard_webhook_event.rb +5 -3
- data/lib/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rb +5 -3
- data/lib/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rb +5 -3
- data/lib/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rb +5 -3
- data/lib/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rb +5 -3
- data/lib/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rb +5 -3
- data/lib/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rb +5 -3
- data/lib/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rb +5 -3
- data/lib/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rb +5 -3
- data/lib/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rb +5 -3
- data/lib/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rb +5 -3
- data/lib/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rb +5 -3
- data/lib/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rb +5 -9
- data/lib/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_created_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_edited_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_ended_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rb +5 -9
- data/lib/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rb +5 -9
- data/lib/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rb +5 -9
- data/lib/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rb +5 -9
- data/lib/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_started_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rb +9 -7
- data/lib/orb/models.rb +6 -0
- data/lib/orb/resources/credit_blocks.rb +35 -0
- data/lib/orb/resources/metrics.rb +61 -5
- data/lib/orb/resources/plans/external_plan_id.rb +6 -3
- data/lib/orb/resources/plans.rb +6 -3
- data/lib/orb/resources/webhook_endpoints.rb +6 -2
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +4 -0
- data/rbi/orb/models/credit_block_update_params.rbi +53 -0
- data/rbi/orb/models/credit_block_update_response.rbi +693 -0
- data/rbi/orb/models/invoice_issue_summary_response.rbi +2 -1
- data/rbi/orb/models/invoice_issued_summary_webhook_event.rbi +6 -3
- data/rbi/orb/models/invoice_list_summary_response.rbi +2 -1
- data/rbi/orb/models/metric_archive_params.rbi +33 -0
- data/rbi/orb/models/metric_list_params.rbi +29 -0
- data/rbi/orb/models/metric_unarchive_params.rbi +35 -0
- data/rbi/orb/models/metric_update_params.rbi +16 -0
- data/rbi/orb/models/plan_update_params.rbi +8 -0
- data/rbi/orb/models/plans/external_plan_id_update_params.rbi +8 -0
- data/rbi/orb/models/subscription_alert_disabled_webhook_event.rbi +6 -12
- data/rbi/orb/models/subscription_grouped_cost_exceeded_webhook_event.rbi +6 -12
- data/rbi/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rbi +6 -12
- data/rbi/orb/models/subscription_license_allocation_reset_webhook_event.rbi +6 -12
- data/rbi/orb/models/subscription_license_balance_threshold_reached_webhook_event.rbi +6 -12
- data/rbi/orb/models/webhook_endpoint.rbi +39 -0
- data/rbi/orb/models/webhook_endpoint_create_params.rbi +51 -0
- data/rbi/orb/models/webhook_endpoint_update_params.rbi +51 -0
- data/rbi/orb/models/webhook_endpoint_with_secret.rbi +50 -0
- data/rbi/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rbi +6 -3
- data/rbi/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rbi +6 -3
- data/rbi/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rbi +6 -3
- data/rbi/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rbi +6 -3
- data/rbi/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rbi +6 -3
- data/rbi/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rbi +6 -3
- data/rbi/orb/models/webhooks/invoice_edited_standard_webhook_event.rbi +6 -3
- data/rbi/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rbi +6 -3
- data/rbi/orb/models/webhooks/invoice_issued_standard_webhook_event.rbi +6 -3
- data/rbi/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rbi +6 -3
- data/rbi/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rbi +6 -3
- data/rbi/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rbi +6 -3
- data/rbi/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rbi +6 -3
- data/rbi/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rbi +6 -3
- data/rbi/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rbi +6 -3
- data/rbi/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rbi +6 -3
- data/rbi/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rbi +6 -3
- data/rbi/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rbi +6 -3
- data/rbi/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rbi +6 -3
- data/rbi/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rbi +6 -3
- data/rbi/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rbi +6 -12
- data/rbi/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_created_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_edited_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_ended_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rbi +6 -12
- data/rbi/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rbi +6 -12
- data/rbi/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rbi +6 -12
- data/rbi/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rbi +6 -12
- data/rbi/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_started_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models.rbi +6 -0
- data/rbi/orb/resources/credit_blocks.rbi +26 -0
- data/rbi/orb/resources/metrics.rbi +44 -3
- data/rbi/orb/resources/plans/external_plan_id.rbi +6 -2
- data/rbi/orb/resources/plans.rbi +6 -2
- data/rbi/orb/resources/webhook_endpoints.rbi +10 -0
- data/sig/orb/models/credit_block_update_params.rbs +28 -0
- data/sig/orb/models/credit_block_update_response.rbs +263 -0
- data/sig/orb/models/metric_archive_params.rbs +23 -0
- data/sig/orb/models/metric_list_params.rbs +18 -1
- data/sig/orb/models/metric_unarchive_params.rbs +23 -0
- data/sig/orb/models/metric_update_params.rbs +14 -1
- data/sig/orb/models/plan_update_params.rbs +6 -1
- data/sig/orb/models/plans/external_plan_id_update_params.rbs +6 -1
- data/sig/orb/models/webhook_endpoint.rbs +16 -0
- data/sig/orb/models/webhook_endpoint_create_params.rbs +20 -1
- data/sig/orb/models/webhook_endpoint_update_params.rbs +16 -0
- data/sig/orb/models/webhook_endpoint_with_secret.rbs +16 -0
- data/sig/orb/models.rbs +6 -0
- data/sig/orb/resources/credit_blocks.rbs +6 -0
- data/sig/orb/resources/metrics.rbs +13 -0
- data/sig/orb/resources/plans/external_plan_id.rbs +1 -0
- data/sig/orb/resources/plans.rbs +1 -0
- data/sig/orb/resources/webhook_endpoints.rbs +2 -0
- metadata +13 -1
|
@@ -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 `
|
|
48
|
-
#
|
|
49
|
-
#
|
|
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
|
-
#
|
|
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>]
|
|
@@ -113,6 +123,31 @@ module Orb
|
|
|
113
123
|
)
|
|
114
124
|
end
|
|
115
125
|
|
|
126
|
+
# This endpoint archives a [metric](/core-concepts#metric). Archived metrics are
|
|
127
|
+
# left out of `GET /v1/metrics` when filtering with `status=active`, and can't be
|
|
128
|
+
# chosen when creating new plans in the Orb dashboard.
|
|
129
|
+
#
|
|
130
|
+
# Archiving does not change existing prices, plans, or subscriptions that use the
|
|
131
|
+
# metric, and usage on those prices continues to be billed. A metric that is
|
|
132
|
+
# already archived cannot be archived again.
|
|
133
|
+
#
|
|
134
|
+
# @overload archive(metric_id, request_options: {})
|
|
135
|
+
#
|
|
136
|
+
# @param metric_id [String]
|
|
137
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
138
|
+
#
|
|
139
|
+
# @return [Orb::Models::BillableMetric]
|
|
140
|
+
#
|
|
141
|
+
# @see Orb::Models::MetricArchiveParams
|
|
142
|
+
def archive(metric_id, params = {})
|
|
143
|
+
@client.request(
|
|
144
|
+
method: :post,
|
|
145
|
+
path: ["metrics/%1$s/archive", metric_id],
|
|
146
|
+
model: Orb::BillableMetric,
|
|
147
|
+
options: params[:request_options]
|
|
148
|
+
)
|
|
149
|
+
end
|
|
150
|
+
|
|
116
151
|
# This endpoint is used to fetch [metric](/core-concepts#metric) details given a
|
|
117
152
|
# metric identifier. It returns information about the metrics including its name,
|
|
118
153
|
# description, and item.
|
|
@@ -134,6 +169,27 @@ module Orb
|
|
|
134
169
|
)
|
|
135
170
|
end
|
|
136
171
|
|
|
172
|
+
# This endpoint restores an archived [metric](/core-concepts#metric) to `active`,
|
|
173
|
+
# so it can be chosen for new plans again. Only archived metrics can be
|
|
174
|
+
# unarchived.
|
|
175
|
+
#
|
|
176
|
+
# @overload unarchive(metric_id, request_options: {})
|
|
177
|
+
#
|
|
178
|
+
# @param metric_id [String]
|
|
179
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
180
|
+
#
|
|
181
|
+
# @return [Orb::Models::BillableMetric]
|
|
182
|
+
#
|
|
183
|
+
# @see Orb::Models::MetricUnarchiveParams
|
|
184
|
+
def unarchive(metric_id, params = {})
|
|
185
|
+
@client.request(
|
|
186
|
+
method: :post,
|
|
187
|
+
path: ["metrics/%1$s/unarchive", metric_id],
|
|
188
|
+
model: Orb::BillableMetric,
|
|
189
|
+
options: params[:request_options]
|
|
190
|
+
)
|
|
191
|
+
end
|
|
192
|
+
|
|
137
193
|
# @api private
|
|
138
194
|
#
|
|
139
195
|
# @param client [Orb::Client]
|
|
@@ -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 `
|
|
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]
|
data/lib/orb/resources/plans.rb
CHANGED
|
@@ -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 `
|
|
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
data/lib/orb.rb
CHANGED
|
@@ -107,6 +107,8 @@ require_relative "orb/models/credit_block_list_invoices_params"
|
|
|
107
107
|
require_relative "orb/models/credit_block_list_invoices_response"
|
|
108
108
|
require_relative "orb/models/credit_block_retrieve_params"
|
|
109
109
|
require_relative "orb/models/credit_block_retrieve_response"
|
|
110
|
+
require_relative "orb/models/credit_block_update_params"
|
|
111
|
+
require_relative "orb/models/credit_block_update_response"
|
|
110
112
|
require_relative "orb/models/credit_note"
|
|
111
113
|
require_relative "orb/models/credit_note_accounting_sync_failed_webhook_event"
|
|
112
114
|
require_relative "orb/models/credit_note_accounting_sync_succeeded_webhook_event"
|
|
@@ -304,10 +306,12 @@ require_relative "orb/models/matrix_value"
|
|
|
304
306
|
require_relative "orb/models/matrix_with_allocation_config"
|
|
305
307
|
require_relative "orb/models/maximum"
|
|
306
308
|
require_relative "orb/models/maximum_interval"
|
|
309
|
+
require_relative "orb/models/metric_archive_params"
|
|
307
310
|
require_relative "orb/models/metric_create_params"
|
|
308
311
|
require_relative "orb/models/metric_events_dropped_by_watermark_webhook_event"
|
|
309
312
|
require_relative "orb/models/metric_fetch_params"
|
|
310
313
|
require_relative "orb/models/metric_list_params"
|
|
314
|
+
require_relative "orb/models/metric_unarchive_params"
|
|
311
315
|
require_relative "orb/models/metric_update_params"
|
|
312
316
|
require_relative "orb/models/minimum"
|
|
313
317
|
require_relative "orb/models/minimum_interval"
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
class CreditBlockUpdateParams < 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::CreditBlockUpdateParams, Orb::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :block_id
|
|
16
|
+
|
|
17
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
18
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
19
|
+
# by setting `metadata` to `null`.
|
|
20
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
21
|
+
attr_accessor :metadata
|
|
22
|
+
|
|
23
|
+
sig do
|
|
24
|
+
params(
|
|
25
|
+
block_id: String,
|
|
26
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
27
|
+
request_options: Orb::RequestOptions::OrHash
|
|
28
|
+
).returns(T.attached_class)
|
|
29
|
+
end
|
|
30
|
+
def self.new(
|
|
31
|
+
block_id:,
|
|
32
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
33
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
34
|
+
# by setting `metadata` to `null`.
|
|
35
|
+
metadata: nil,
|
|
36
|
+
request_options: {}
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
sig do
|
|
41
|
+
override.returns(
|
|
42
|
+
{
|
|
43
|
+
block_id: String,
|
|
44
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
45
|
+
request_options: Orb::RequestOptions
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
def to_hash
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|