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
data/rbi/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rbi
CHANGED
|
@@ -46,10 +46,8 @@ module Orb
|
|
|
46
46
|
end
|
|
47
47
|
attr_writer :properties
|
|
48
48
|
|
|
49
|
-
#
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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,10 @@ module Orb
|
|
|
44
44
|
end
|
|
45
45
|
attr_writer :properties
|
|
46
46
|
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
47
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
48
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
49
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
50
|
+
# derived fields.
|
|
50
51
|
sig do
|
|
51
52
|
returns(
|
|
52
53
|
Orb::Webhooks::SubscriptionPlanChangeScheduledStandardWebhookEvent::Subscription
|
|
@@ -94,9 +95,10 @@ module Orb
|
|
|
94
95
|
# endpoint.
|
|
95
96
|
payload_style:,
|
|
96
97
|
properties:,
|
|
97
|
-
#
|
|
98
|
-
#
|
|
99
|
-
#
|
|
98
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
99
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
100
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
101
|
+
# derived fields.
|
|
100
102
|
subscription:,
|
|
101
103
|
# The event this payload describes.
|
|
102
104
|
type:
|
|
@@ -265,9 +267,10 @@ module Orb
|
|
|
265
267
|
end
|
|
266
268
|
attr_accessor :status
|
|
267
269
|
|
|
268
|
-
#
|
|
269
|
-
#
|
|
270
|
-
#
|
|
270
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
271
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
272
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
273
|
+
# derived fields.
|
|
271
274
|
sig do
|
|
272
275
|
params(
|
|
273
276
|
id: String,
|
|
@@ -44,9 +44,10 @@ module Orb
|
|
|
44
44
|
end
|
|
45
45
|
attr_writer :properties
|
|
46
46
|
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
47
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
48
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
49
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
50
|
+
# derived fields.
|
|
50
51
|
sig do
|
|
51
52
|
returns(
|
|
52
53
|
Orb::Webhooks::SubscriptionPlanChangedStandardWebhookEvent::Subscription
|
|
@@ -94,9 +95,10 @@ module Orb
|
|
|
94
95
|
# endpoint.
|
|
95
96
|
payload_style:,
|
|
96
97
|
properties:,
|
|
97
|
-
#
|
|
98
|
-
#
|
|
99
|
-
#
|
|
98
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
99
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
100
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
101
|
+
# derived fields.
|
|
100
102
|
subscription:,
|
|
101
103
|
# The event this payload describes.
|
|
102
104
|
type:
|
|
@@ -245,9 +247,10 @@ module Orb
|
|
|
245
247
|
end
|
|
246
248
|
attr_accessor :status
|
|
247
249
|
|
|
248
|
-
#
|
|
249
|
-
#
|
|
250
|
-
#
|
|
250
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
251
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
252
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
253
|
+
# derived fields.
|
|
251
254
|
sig do
|
|
252
255
|
params(
|
|
253
256
|
id: String,
|
data/rbi/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rbi
CHANGED
|
@@ -44,9 +44,10 @@ module Orb
|
|
|
44
44
|
end
|
|
45
45
|
attr_writer :properties
|
|
46
46
|
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
47
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
48
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
49
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
50
|
+
# derived fields.
|
|
50
51
|
sig do
|
|
51
52
|
returns(
|
|
52
53
|
Orb::Webhooks::SubscriptionPlanVersionChangeScheduledStandardWebhookEvent::Subscription
|
|
@@ -94,9 +95,10 @@ module Orb
|
|
|
94
95
|
# endpoint.
|
|
95
96
|
payload_style:,
|
|
96
97
|
properties:,
|
|
97
|
-
#
|
|
98
|
-
#
|
|
99
|
-
#
|
|
98
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
99
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
100
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
101
|
+
# derived fields.
|
|
100
102
|
subscription:,
|
|
101
103
|
# The event this payload describes.
|
|
102
104
|
type:
|
|
@@ -269,9 +271,10 @@ module Orb
|
|
|
269
271
|
end
|
|
270
272
|
attr_accessor :status
|
|
271
273
|
|
|
272
|
-
#
|
|
273
|
-
#
|
|
274
|
-
#
|
|
274
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
275
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
276
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
277
|
+
# derived fields.
|
|
275
278
|
sig do
|
|
276
279
|
params(
|
|
277
280
|
id: String,
|
|
@@ -44,9 +44,10 @@ module Orb
|
|
|
44
44
|
end
|
|
45
45
|
attr_writer :properties
|
|
46
46
|
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
47
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
48
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
49
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
50
|
+
# derived fields.
|
|
50
51
|
sig do
|
|
51
52
|
returns(
|
|
52
53
|
Orb::Webhooks::SubscriptionPlanVersionChangedStandardWebhookEvent::Subscription
|
|
@@ -94,9 +95,10 @@ module Orb
|
|
|
94
95
|
# endpoint.
|
|
95
96
|
payload_style:,
|
|
96
97
|
properties:,
|
|
97
|
-
#
|
|
98
|
-
#
|
|
99
|
-
#
|
|
98
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
99
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
100
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
101
|
+
# derived fields.
|
|
100
102
|
subscription:,
|
|
101
103
|
# The event this payload describes.
|
|
102
104
|
type:
|
|
@@ -269,9 +271,10 @@ module Orb
|
|
|
269
271
|
end
|
|
270
272
|
attr_accessor :status
|
|
271
273
|
|
|
272
|
-
#
|
|
273
|
-
#
|
|
274
|
-
#
|
|
274
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
275
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
276
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
277
|
+
# derived fields.
|
|
275
278
|
sig do
|
|
276
279
|
params(
|
|
277
280
|
id: String,
|
|
@@ -44,9 +44,10 @@ module Orb
|
|
|
44
44
|
end
|
|
45
45
|
attr_writer :properties
|
|
46
46
|
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
47
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
48
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
49
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
50
|
+
# derived fields.
|
|
50
51
|
sig do
|
|
51
52
|
returns(
|
|
52
53
|
Orb::Webhooks::SubscriptionSpendExceededStandardWebhookEvent::Subscription
|
|
@@ -95,9 +96,10 @@ module Orb
|
|
|
95
96
|
# endpoint.
|
|
96
97
|
payload_style:,
|
|
97
98
|
properties:,
|
|
98
|
-
#
|
|
99
|
-
#
|
|
100
|
-
#
|
|
99
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
100
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
101
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
102
|
+
# derived fields.
|
|
101
103
|
subscription:,
|
|
102
104
|
# The event this payload describes.
|
|
103
105
|
type:
|
|
@@ -1111,9 +1113,10 @@ module Orb
|
|
|
1111
1113
|
end
|
|
1112
1114
|
attr_accessor :status
|
|
1113
1115
|
|
|
1114
|
-
#
|
|
1115
|
-
#
|
|
1116
|
-
#
|
|
1116
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
1117
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
1118
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
1119
|
+
# derived fields.
|
|
1117
1120
|
sig do
|
|
1118
1121
|
params(
|
|
1119
1122
|
id: String,
|
|
@@ -32,9 +32,10 @@ module Orb
|
|
|
32
32
|
sig { returns(T.anything) }
|
|
33
33
|
attr_accessor :properties
|
|
34
34
|
|
|
35
|
-
#
|
|
36
|
-
#
|
|
37
|
-
#
|
|
35
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
36
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
37
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
38
|
+
# derived fields.
|
|
38
39
|
sig do
|
|
39
40
|
returns(
|
|
40
41
|
Orb::Webhooks::SubscriptionStartedStandardWebhookEvent::Subscription
|
|
@@ -81,9 +82,10 @@ module Orb
|
|
|
81
82
|
# endpoint.
|
|
82
83
|
payload_style:,
|
|
83
84
|
properties:,
|
|
84
|
-
#
|
|
85
|
-
#
|
|
86
|
-
#
|
|
85
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
86
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
87
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
88
|
+
# derived fields.
|
|
87
89
|
subscription:,
|
|
88
90
|
# The event this payload describes.
|
|
89
91
|
type:
|
|
@@ -210,9 +212,10 @@ module Orb
|
|
|
210
212
|
end
|
|
211
213
|
attr_accessor :status
|
|
212
214
|
|
|
213
|
-
#
|
|
214
|
-
#
|
|
215
|
-
#
|
|
215
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
216
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
217
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
218
|
+
# derived fields.
|
|
216
219
|
sig do
|
|
217
220
|
params(
|
|
218
221
|
id: String,
|
|
@@ -32,9 +32,10 @@ module Orb
|
|
|
32
32
|
sig { returns(T.anything) }
|
|
33
33
|
attr_accessor :properties
|
|
34
34
|
|
|
35
|
-
#
|
|
36
|
-
#
|
|
37
|
-
#
|
|
35
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
36
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
37
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
38
|
+
# derived fields.
|
|
38
39
|
sig do
|
|
39
40
|
returns(
|
|
40
41
|
Orb::Webhooks::SubscriptionTrialEndedStandardWebhookEvent::Subscription
|
|
@@ -81,9 +82,10 @@ module Orb
|
|
|
81
82
|
# endpoint.
|
|
82
83
|
payload_style:,
|
|
83
84
|
properties:,
|
|
84
|
-
#
|
|
85
|
-
#
|
|
86
|
-
#
|
|
85
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
86
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
87
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
88
|
+
# derived fields.
|
|
87
89
|
subscription:,
|
|
88
90
|
# The event this payload describes.
|
|
89
91
|
type:
|
|
@@ -210,9 +212,10 @@ module Orb
|
|
|
210
212
|
end
|
|
211
213
|
attr_accessor :status
|
|
212
214
|
|
|
213
|
-
#
|
|
214
|
-
#
|
|
215
|
-
#
|
|
215
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
216
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
217
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
218
|
+
# derived fields.
|
|
216
219
|
sig do
|
|
217
220
|
params(
|
|
218
221
|
id: String,
|
|
@@ -44,9 +44,10 @@ module Orb
|
|
|
44
44
|
end
|
|
45
45
|
attr_writer :properties
|
|
46
46
|
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
47
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
48
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
49
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
50
|
+
# derived fields.
|
|
50
51
|
sig do
|
|
51
52
|
returns(
|
|
52
53
|
Orb::Webhooks::SubscriptionUsageExceededStandardWebhookEvent::Subscription
|
|
@@ -95,9 +96,10 @@ module Orb
|
|
|
95
96
|
# endpoint.
|
|
96
97
|
payload_style:,
|
|
97
98
|
properties:,
|
|
98
|
-
#
|
|
99
|
-
#
|
|
100
|
-
#
|
|
99
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
100
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
101
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
102
|
+
# derived fields.
|
|
101
103
|
subscription:,
|
|
102
104
|
# The event this payload describes.
|
|
103
105
|
type:
|
|
@@ -1117,9 +1119,10 @@ module Orb
|
|
|
1117
1119
|
end
|
|
1118
1120
|
attr_accessor :status
|
|
1119
1121
|
|
|
1120
|
-
#
|
|
1121
|
-
#
|
|
1122
|
-
#
|
|
1122
|
+
# A subscription's own fields, with its plan and customer as references, as listed
|
|
1123
|
+
# by List subscription summaries and carried in standard webhook payloads. Fetch
|
|
1124
|
+
# the subscription for its price intervals, billing periods, plan phases and other
|
|
1125
|
+
# derived fields.
|
|
1123
1126
|
sig do
|
|
1124
1127
|
params(
|
|
1125
1128
|
id: String,
|
data/rbi/orb/models.rbi
CHANGED
|
@@ -106,6 +106,8 @@ module Orb
|
|
|
106
106
|
|
|
107
107
|
CreditBlockRetrieveParams = Orb::Models::CreditBlockRetrieveParams
|
|
108
108
|
|
|
109
|
+
CreditBlockUpdateParams = Orb::Models::CreditBlockUpdateParams
|
|
110
|
+
|
|
109
111
|
CreditNote = Orb::Models::CreditNote
|
|
110
112
|
|
|
111
113
|
CreditNoteAccountingSyncFailedWebhookEvent =
|
|
@@ -392,6 +394,8 @@ module Orb
|
|
|
392
394
|
|
|
393
395
|
MaximumInterval = Orb::Models::MaximumInterval
|
|
394
396
|
|
|
397
|
+
MetricArchiveParams = Orb::Models::MetricArchiveParams
|
|
398
|
+
|
|
395
399
|
MetricCreateParams = Orb::Models::MetricCreateParams
|
|
396
400
|
|
|
397
401
|
MetricEventsDroppedByWatermarkWebhookEvent =
|
|
@@ -401,6 +405,8 @@ module Orb
|
|
|
401
405
|
|
|
402
406
|
MetricListParams = Orb::Models::MetricListParams
|
|
403
407
|
|
|
408
|
+
MetricUnarchiveParams = Orb::Models::MetricUnarchiveParams
|
|
409
|
+
|
|
404
410
|
MetricUpdateParams = Orb::Models::MetricUpdateParams
|
|
405
411
|
|
|
406
412
|
Minimum = Orb::Models::Minimum
|
|
@@ -15,6 +15,32 @@ module Orb
|
|
|
15
15
|
def retrieve(block_id, request_options: {})
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
# This endpoint updates the `metadata` of a credit block. Keys you pass are added
|
|
19
|
+
# to the block's existing metadata or overwrite the value already stored for that
|
|
20
|
+
# key, and setting a key to `null` removes it. Passing `null` for `metadata`
|
|
21
|
+
# clears all of the block's metadata. The block's `increment` entry in the
|
|
22
|
+
# [credits ledger](fetch-customer-credits-ledger) reports the block's metadata, so
|
|
23
|
+
# it shows the update too.
|
|
24
|
+
#
|
|
25
|
+
# Other fields on a credit block cannot be changed through this endpoint. Deleted
|
|
26
|
+
# credit blocks return a 404.
|
|
27
|
+
sig do
|
|
28
|
+
params(
|
|
29
|
+
block_id: String,
|
|
30
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
31
|
+
request_options: Orb::RequestOptions::OrHash
|
|
32
|
+
).returns(Orb::Models::CreditBlockUpdateResponse)
|
|
33
|
+
end
|
|
34
|
+
def update(
|
|
35
|
+
block_id,
|
|
36
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
37
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
38
|
+
# by setting `metadata` to `null`.
|
|
39
|
+
metadata: nil,
|
|
40
|
+
request_options: {}
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
|
|
18
44
|
# This endpoint deletes a credit block by its ID.
|
|
19
45
|
#
|
|
20
46
|
# When a credit block is deleted:
|
|
@@ -36,28 +36,38 @@ module Orb
|
|
|
36
36
|
)
|
|
37
37
|
end
|
|
38
38
|
|
|
39
|
-
# This endpoint allows you to update the `
|
|
40
|
-
#
|
|
41
|
-
#
|
|
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,10 +90,28 @@ 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
|
|
85
98
|
|
|
99
|
+
# This endpoint archives a [metric](/core-concepts#metric). Archived metrics are
|
|
100
|
+
# left out of `GET /v1/metrics` when filtering with `status=active`, and can't be
|
|
101
|
+
# chosen when creating new plans in the Orb dashboard.
|
|
102
|
+
#
|
|
103
|
+
# Archiving does not change existing prices, plans, or subscriptions that use the
|
|
104
|
+
# metric, and usage on those prices continues to be billed. A metric that is
|
|
105
|
+
# already archived cannot be archived again.
|
|
106
|
+
sig do
|
|
107
|
+
params(
|
|
108
|
+
metric_id: String,
|
|
109
|
+
request_options: Orb::RequestOptions::OrHash
|
|
110
|
+
).returns(Orb::BillableMetric)
|
|
111
|
+
end
|
|
112
|
+
def archive(metric_id, request_options: {})
|
|
113
|
+
end
|
|
114
|
+
|
|
86
115
|
# This endpoint is used to fetch [metric](/core-concepts#metric) details given a
|
|
87
116
|
# metric identifier. It returns information about the metrics including its name,
|
|
88
117
|
# description, and item.
|
|
@@ -95,6 +124,18 @@ module Orb
|
|
|
95
124
|
def fetch(metric_id, request_options: {})
|
|
96
125
|
end
|
|
97
126
|
|
|
127
|
+
# This endpoint restores an archived [metric](/core-concepts#metric) to `active`,
|
|
128
|
+
# so it can be chosen for new plans again. Only archived metrics can be
|
|
129
|
+
# unarchived.
|
|
130
|
+
sig do
|
|
131
|
+
params(
|
|
132
|
+
metric_id: String,
|
|
133
|
+
request_options: Orb::RequestOptions::OrHash
|
|
134
|
+
).returns(Orb::BillableMetric)
|
|
135
|
+
end
|
|
136
|
+
def unarchive(metric_id, request_options: {})
|
|
137
|
+
end
|
|
138
|
+
|
|
98
139
|
# @api private
|
|
99
140
|
sig { params(client: Orb::Client).returns(T.attached_class) }
|
|
100
141
|
def self.new(client:)
|
|
@@ -8,8 +8,9 @@ module Orb
|
|
|
8
8
|
# subscription. You can see more about how to configure prices in the
|
|
9
9
|
# [Price resource](/reference/price).
|
|
10
10
|
class ExternalPlanID
|
|
11
|
-
# This endpoint can be used to update the `
|
|
12
|
-
# `metadata` of an existing plan.
|
|
11
|
+
# This endpoint can be used to update the `name`, `external_plan_id`,
|
|
12
|
+
# `description`, and `metadata` of an existing plan. A plan's `name` cannot be
|
|
13
|
+
# empty.
|
|
13
14
|
#
|
|
14
15
|
# Other fields on a plan are currently immutable.
|
|
15
16
|
sig do
|
|
@@ -18,6 +19,7 @@ module Orb
|
|
|
18
19
|
description: T.nilable(String),
|
|
19
20
|
external_plan_id: T.nilable(String),
|
|
20
21
|
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
22
|
+
name: T.nilable(String),
|
|
21
23
|
request_options: Orb::RequestOptions::OrHash
|
|
22
24
|
).returns(Orb::Plan)
|
|
23
25
|
end
|
|
@@ -33,6 +35,8 @@ module Orb
|
|
|
33
35
|
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
34
36
|
# by setting `metadata` to `null`.
|
|
35
37
|
metadata: nil,
|
|
38
|
+
# The name of the plan.
|
|
39
|
+
name: nil,
|
|
36
40
|
request_options: {}
|
|
37
41
|
)
|
|
38
42
|
end
|
data/rbi/orb/resources/plans.rbi
CHANGED
|
@@ -74,8 +74,9 @@ module Orb
|
|
|
74
74
|
)
|
|
75
75
|
end
|
|
76
76
|
|
|
77
|
-
# This endpoint can be used to update the `
|
|
78
|
-
# `metadata` of an existing plan.
|
|
77
|
+
# This endpoint can be used to update the `name`, `external_plan_id`,
|
|
78
|
+
# `description`, and `metadata` of an existing plan. A plan's `name` cannot be
|
|
79
|
+
# empty.
|
|
79
80
|
#
|
|
80
81
|
# Other fields on a plan are currently immutable.
|
|
81
82
|
sig do
|
|
@@ -84,6 +85,7 @@ module Orb
|
|
|
84
85
|
description: T.nilable(String),
|
|
85
86
|
external_plan_id: T.nilable(String),
|
|
86
87
|
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
88
|
+
name: T.nilable(String),
|
|
87
89
|
request_options: Orb::RequestOptions::OrHash
|
|
88
90
|
).returns(Orb::Plan)
|
|
89
91
|
end
|
|
@@ -99,6 +101,8 @@ module Orb
|
|
|
99
101
|
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
100
102
|
# by setting `metadata` to `null`.
|
|
101
103
|
metadata: nil,
|
|
104
|
+
# The name of the plan.
|
|
105
|
+
name: nil,
|
|
102
106
|
request_options: {}
|
|
103
107
|
)
|
|
104
108
|
end
|