orb-billing 1.43.0 → 1.45.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 +15 -0
- data/README.md +1 -1
- data/lib/orb/client.rb +6 -0
- data/lib/orb/models/alert_create_for_plan_params.rb +156 -0
- data/lib/orb/models/backfill_reflected_webhook_event.rb +24 -1
- data/lib/orb/models/backfill_reverted_webhook_event.rb +24 -1
- data/lib/orb/models/billable_metric_edited_webhook_event.rb +24 -1
- data/lib/orb/models/credit_block_accounting_sync_failed_webhook_event.rb +27 -1
- data/lib/orb/models/credit_block_accounting_sync_succeeded_webhook_event.rb +27 -1
- data/lib/orb/models/credit_note_accounting_sync_failed_webhook_event.rb +24 -1
- data/lib/orb/models/credit_note_accounting_sync_succeeded_webhook_event.rb +24 -1
- data/lib/orb/models/credit_note_issued_webhook_event.rb +24 -1
- data/lib/orb/models/credit_note_marked_as_void_webhook_event.rb +24 -1
- data/lib/orb/models/customer_accounting_sync_failed_webhook_event.rb +24 -1
- data/lib/orb/models/customer_accounting_sync_succeeded_webhook_event.rb +24 -1
- data/lib/orb/models/customer_balance_transaction_created_webhook_event.rb +24 -1
- data/lib/orb/models/customer_created_webhook_event.rb +24 -1
- data/lib/orb/models/customer_credit_balance_depleted_webhook_event.rb +24 -1
- data/lib/orb/models/customer_credit_balance_dropped_webhook_event.rb +24 -1
- data/lib/orb/models/customer_credit_balance_recovered_webhook_event.rb +24 -1
- data/lib/orb/models/customer_credit_ledger_incremented_webhook_event.rb +24 -1
- data/lib/orb/models/customer_edited_webhook_event.rb +24 -1
- data/lib/orb/models/data_exports_transfer_error_webhook_event.rb +27 -1
- data/lib/orb/models/data_exports_transfer_success_webhook_event.rb +27 -1
- data/lib/orb/models/dimensional_price_groups/price_create_params.rb +147 -0
- data/lib/orb/models/dimensional_price_groups/price_create_response.rb +19 -0
- data/lib/orb/models/dimensional_price_groups/price_list_params.rb +65 -0
- data/lib/orb/models/event_unmatched_event_webhook_event.rb +27 -1
- data/lib/orb/models/ingestion_unmatched_customer_ids_webhook_event.rb +27 -1
- data/lib/orb/models/invoice_accounting_sync_failed_webhook_event.rb +24 -1
- data/lib/orb/models/invoice_accounting_sync_succeeded_webhook_event.rb +24 -1
- data/lib/orb/models/invoice_automation_schedule_step_executed_webhook_event.rb +24 -1
- data/lib/orb/models/invoice_cost_data_exported_webhook_event.rb +27 -1
- data/lib/orb/models/invoice_due_date_recalculation_canceled_webhook_event.rb +27 -1
- data/lib/orb/models/invoice_due_date_recalculation_completed_webhook_event.rb +28 -1
- data/lib/orb/models/invoice_due_date_recalculation_started_webhook_event.rb +27 -1
- data/lib/orb/models/invoice_dunning_schedule_created_webhook_event.rb +24 -1
- data/lib/orb/models/invoice_dunning_schedule_ended_webhook_event.rb +24 -1
- data/lib/orb/models/invoice_dunning_schedule_reset_webhook_event.rb +24 -1
- data/lib/orb/models/invoice_dunning_schedule_step_executed_webhook_event.rb +24 -1
- data/lib/orb/models/invoice_edited_webhook_event.rb +24 -1
- data/lib/orb/models/invoice_invoice_date_elapsed_webhook_event.rb +27 -1
- data/lib/orb/models/invoice_issue_failed_webhook_event.rb +24 -1
- data/lib/orb/models/invoice_issued_summary_webhook_event.rb +27 -1
- data/lib/orb/models/invoice_issued_webhook_event.rb +24 -1
- data/lib/orb/models/invoice_manually_marked_as_paid_webhook_event.rb +24 -1
- data/lib/orb/models/invoice_manually_marked_as_void_webhook_event.rb +24 -1
- data/lib/orb/models/invoice_payment_failed_webhook_event.rb +24 -1
- data/lib/orb/models/invoice_payment_processing_webhook_event.rb +24 -1
- data/lib/orb/models/invoice_payment_succeeded_webhook_event.rb +24 -1
- data/lib/orb/models/invoice_sync_failed_webhook_event.rb +24 -1
- data/lib/orb/models/invoice_sync_succeeded_webhook_event.rb +24 -1
- data/lib/orb/models/invoice_undo_mark_as_paid_webhook_event.rb +24 -1
- data/lib/orb/models/metric_events_dropped_by_watermark_webhook_event.rb +24 -1
- data/lib/orb/models/payment_method_created_webhook_event.rb +24 -1
- data/lib/orb/models/payment_method_deleted_webhook_event.rb +24 -1
- data/lib/orb/models/plan_created_webhook_event.rb +117 -0
- data/lib/orb/models/plan_default_version_set_webhook_event.rb +27 -1
- data/lib/orb/models/plan_edited_webhook_event.rb +154 -0
- data/lib/orb/models/plan_version_created_webhook_event.rb +27 -1
- data/lib/orb/models/price_edited_webhook_event.rb +24 -1
- data/lib/orb/models/resource_event_test_webhook_event.rb +27 -1
- data/lib/orb/models/sales_order_accounting_sync_failed_webhook_event.rb +24 -1
- data/lib/orb/models/sales_order_accounting_sync_succeeded_webhook_event.rb +24 -1
- data/lib/orb/models/subscription_accounting_sync_failed_webhook_event.rb +24 -1
- data/lib/orb/models/subscription_accounting_sync_succeeded_webhook_event.rb +24 -1
- data/lib/orb/models/subscription_alert_disabled_webhook_event.rb +24 -1
- data/lib/orb/models/subscription_cancellation_scheduled_webhook_event.rb +24 -1
- data/lib/orb/models/subscription_cancellation_unscheduled_webhook_event.rb +24 -1
- data/lib/orb/models/subscription_cost_exceeded_webhook_event.rb +24 -1
- data/lib/orb/models/subscription_created_webhook_event.rb +24 -1
- data/lib/orb/models/subscription_edited_webhook_event.rb +24 -1
- data/lib/orb/models/subscription_ended_webhook_event.rb +24 -1
- data/lib/orb/models/subscription_fixed_fee_quantity_updated_webhook_event.rb +24 -1
- data/lib/orb/models/subscription_grouped_cost_exceeded_webhook_event.rb +24 -1
- data/lib/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rb +25 -1
- data/lib/orb/models/subscription_license_allocation_reset_webhook_event.rb +24 -1
- data/lib/orb/models/subscription_license_balance_threshold_reached_webhook_event.rb +25 -1
- data/lib/orb/models/subscription_plan_change_scheduled_webhook_event.rb +24 -1
- data/lib/orb/models/subscription_plan_changed_webhook_event.rb +24 -1
- data/lib/orb/models/subscription_plan_version_change_scheduled_webhook_event.rb +25 -1
- data/lib/orb/models/subscription_plan_version_changed_webhook_event.rb +24 -1
- data/lib/orb/models/subscription_spend_exceeded_webhook_event.rb +24 -1
- data/lib/orb/models/subscription_started_webhook_event.rb +24 -1
- data/lib/orb/models/subscription_trial_ended_webhook_event.rb +24 -1
- data/lib/orb/models/subscription_usage_exceeded_webhook_event.rb +24 -1
- data/lib/orb/models/tax_amount.rb +32 -1
- data/lib/orb/models/transaction_accounting_sync_failed_webhook_event.rb +27 -1
- data/lib/orb/models/transaction_accounting_sync_succeeded_webhook_event.rb +27 -1
- data/lib/orb/models/unwrap_webhook_event.rb +7 -1
- data/lib/orb/models/webhook_endpoint.rb +56 -0
- data/lib/orb/models/webhook_endpoint_create_params.rb +34 -0
- data/lib/orb/models/webhook_endpoint_delete_params.rb +20 -0
- data/lib/orb/models/webhook_endpoint_disable_params.rb +20 -0
- data/lib/orb/models/webhook_endpoint_enable_params.rb +20 -0
- data/lib/orb/models/webhook_endpoint_list_params.rb +34 -0
- data/lib/orb/models/webhook_endpoint_retrieve_params.rb +20 -0
- data/lib/orb/models/webhook_endpoint_update_params.rb +41 -0
- data/lib/orb/models/webhook_endpoint_with_secret.rb +65 -0
- data/lib/orb/models.rb +24 -0
- data/lib/orb/resources/alerts.rb +55 -0
- data/lib/orb/resources/dimensional_price_groups/prices.rb +87 -0
- data/lib/orb/resources/dimensional_price_groups.rb +4 -0
- data/lib/orb/resources/webhook_endpoints.rb +183 -0
- data/lib/orb/resources/webhooks.rb +1 -1
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +17 -0
- data/rbi/orb/client.rbi +5 -0
- data/rbi/orb/models/alert_create_for_plan_params.rbi +290 -0
- data/rbi/orb/models/backfill_reflected_webhook_event.rbi +47 -0
- data/rbi/orb/models/backfill_reverted_webhook_event.rbi +47 -0
- data/rbi/orb/models/billable_metric_edited_webhook_event.rbi +49 -0
- data/rbi/orb/models/credit_block_accounting_sync_failed_webhook_event.rbi +52 -0
- data/rbi/orb/models/credit_block_accounting_sync_succeeded_webhook_event.rbi +52 -0
- data/rbi/orb/models/credit_note_accounting_sync_failed_webhook_event.rbi +52 -0
- data/rbi/orb/models/credit_note_accounting_sync_succeeded_webhook_event.rbi +52 -0
- data/rbi/orb/models/credit_note_issued_webhook_event.rbi +47 -0
- data/rbi/orb/models/credit_note_marked_as_void_webhook_event.rbi +49 -0
- data/rbi/orb/models/customer_accounting_sync_failed_webhook_event.rbi +52 -0
- data/rbi/orb/models/customer_accounting_sync_succeeded_webhook_event.rbi +52 -0
- data/rbi/orb/models/customer_balance_transaction_created_webhook_event.rbi +52 -0
- data/rbi/orb/models/customer_created_webhook_event.rbi +47 -0
- data/rbi/orb/models/customer_credit_balance_depleted_webhook_event.rbi +52 -0
- data/rbi/orb/models/customer_credit_balance_dropped_webhook_event.rbi +52 -0
- data/rbi/orb/models/customer_credit_balance_recovered_webhook_event.rbi +52 -0
- data/rbi/orb/models/customer_credit_ledger_incremented_webhook_event.rbi +52 -0
- data/rbi/orb/models/customer_edited_webhook_event.rbi +47 -0
- data/rbi/orb/models/data_exports_transfer_error_webhook_event.rbi +52 -0
- data/rbi/orb/models/data_exports_transfer_success_webhook_event.rbi +52 -0
- data/rbi/orb/models/dimensional_price_groups/price_create_params.rbi +298 -0
- data/rbi/orb/models/dimensional_price_groups/price_create_response.rbi +76 -0
- data/rbi/orb/models/dimensional_price_groups/price_list_params.rbi +134 -0
- data/rbi/orb/models/event_unmatched_event_webhook_event.rbi +49 -0
- data/rbi/orb/models/ingestion_unmatched_customer_ids_webhook_event.rbi +52 -0
- data/rbi/orb/models/invoice_accounting_sync_failed_webhook_event.rbi +52 -0
- data/rbi/orb/models/invoice_accounting_sync_succeeded_webhook_event.rbi +52 -0
- data/rbi/orb/models/invoice_automation_schedule_step_executed_webhook_event.rbi +52 -0
- data/rbi/orb/models/invoice_cost_data_exported_webhook_event.rbi +52 -0
- data/rbi/orb/models/invoice_due_date_recalculation_canceled_webhook_event.rbi +52 -0
- data/rbi/orb/models/invoice_due_date_recalculation_completed_webhook_event.rbi +52 -0
- data/rbi/orb/models/invoice_due_date_recalculation_started_webhook_event.rbi +52 -0
- data/rbi/orb/models/invoice_dunning_schedule_created_webhook_event.rbi +52 -0
- data/rbi/orb/models/invoice_dunning_schedule_ended_webhook_event.rbi +52 -0
- data/rbi/orb/models/invoice_dunning_schedule_reset_webhook_event.rbi +52 -0
- data/rbi/orb/models/invoice_dunning_schedule_step_executed_webhook_event.rbi +52 -0
- data/rbi/orb/models/invoice_edited_webhook_event.rbi +44 -0
- data/rbi/orb/models/invoice_invoice_date_elapsed_webhook_event.rbi +52 -0
- data/rbi/orb/models/invoice_issue_failed_webhook_event.rbi +47 -0
- data/rbi/orb/models/invoice_issued_summary_webhook_event.rbi +49 -0
- data/rbi/orb/models/invoice_issued_webhook_event.rbi +44 -0
- data/rbi/orb/models/invoice_manually_marked_as_paid_webhook_event.rbi +52 -0
- data/rbi/orb/models/invoice_manually_marked_as_void_webhook_event.rbi +52 -0
- data/rbi/orb/models/invoice_payment_failed_webhook_event.rbi +49 -0
- data/rbi/orb/models/invoice_payment_processing_webhook_event.rbi +52 -0
- data/rbi/orb/models/invoice_payment_succeeded_webhook_event.rbi +52 -0
- data/rbi/orb/models/invoice_sync_failed_webhook_event.rbi +47 -0
- data/rbi/orb/models/invoice_sync_succeeded_webhook_event.rbi +49 -0
- data/rbi/orb/models/invoice_undo_mark_as_paid_webhook_event.rbi +49 -0
- data/rbi/orb/models/metric_events_dropped_by_watermark_webhook_event.rbi +52 -0
- data/rbi/orb/models/payment_method_created_webhook_event.rbi +49 -0
- data/rbi/orb/models/payment_method_deleted_webhook_event.rbi +49 -0
- data/rbi/orb/models/plan_created_webhook_event.rbi +182 -0
- data/rbi/orb/models/plan_default_version_set_webhook_event.rbi +49 -0
- data/rbi/orb/models/plan_edited_webhook_event.rbi +301 -0
- data/rbi/orb/models/plan_version_created_webhook_event.rbi +47 -0
- data/rbi/orb/models/price_edited_webhook_event.rbi +42 -0
- data/rbi/orb/models/resource_event_test_webhook_event.rbi +47 -0
- data/rbi/orb/models/sales_order_accounting_sync_failed_webhook_event.rbi +52 -0
- data/rbi/orb/models/sales_order_accounting_sync_succeeded_webhook_event.rbi +52 -0
- data/rbi/orb/models/subscription_accounting_sync_failed_webhook_event.rbi +52 -0
- data/rbi/orb/models/subscription_accounting_sync_succeeded_webhook_event.rbi +52 -0
- data/rbi/orb/models/subscription_alert_disabled_webhook_event.rbi +52 -0
- data/rbi/orb/models/subscription_cancellation_scheduled_webhook_event.rbi +52 -0
- data/rbi/orb/models/subscription_cancellation_unscheduled_webhook_event.rbi +52 -0
- data/rbi/orb/models/subscription_cost_exceeded_webhook_event.rbi +52 -0
- data/rbi/orb/models/subscription_created_webhook_event.rbi +49 -0
- data/rbi/orb/models/subscription_edited_webhook_event.rbi +47 -0
- data/rbi/orb/models/subscription_ended_webhook_event.rbi +47 -0
- data/rbi/orb/models/subscription_fixed_fee_quantity_updated_webhook_event.rbi +52 -0
- data/rbi/orb/models/subscription_grouped_cost_exceeded_webhook_event.rbi +52 -0
- data/rbi/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rbi +52 -0
- data/rbi/orb/models/subscription_license_allocation_reset_webhook_event.rbi +52 -0
- data/rbi/orb/models/subscription_license_balance_threshold_reached_webhook_event.rbi +52 -0
- data/rbi/orb/models/subscription_plan_change_scheduled_webhook_event.rbi +52 -0
- data/rbi/orb/models/subscription_plan_changed_webhook_event.rbi +52 -0
- data/rbi/orb/models/subscription_plan_version_change_scheduled_webhook_event.rbi +52 -0
- data/rbi/orb/models/subscription_plan_version_changed_webhook_event.rbi +52 -0
- data/rbi/orb/models/subscription_spend_exceeded_webhook_event.rbi +52 -0
- data/rbi/orb/models/subscription_started_webhook_event.rbi +49 -0
- data/rbi/orb/models/subscription_trial_ended_webhook_event.rbi +49 -0
- data/rbi/orb/models/subscription_usage_exceeded_webhook_event.rbi +52 -0
- data/rbi/orb/models/tax_amount.rbi +41 -3
- data/rbi/orb/models/transaction_accounting_sync_failed_webhook_event.rbi +52 -0
- data/rbi/orb/models/transaction_accounting_sync_succeeded_webhook_event.rbi +52 -0
- data/rbi/orb/models/unwrap_webhook_event.rbi +2 -0
- data/rbi/orb/models/webhook_endpoint.rbi +71 -0
- data/rbi/orb/models/webhook_endpoint_create_params.rbi +53 -0
- data/rbi/orb/models/webhook_endpoint_delete_params.rbi +35 -0
- data/rbi/orb/models/webhook_endpoint_disable_params.rbi +35 -0
- data/rbi/orb/models/webhook_endpoint_enable_params.rbi +35 -0
- data/rbi/orb/models/webhook_endpoint_list_params.rbi +56 -0
- data/rbi/orb/models/webhook_endpoint_retrieve_params.rbi +35 -0
- data/rbi/orb/models/webhook_endpoint_update_params.rbi +59 -0
- data/rbi/orb/models/webhook_endpoint_with_secret.rbi +83 -0
- data/rbi/orb/models.rbi +24 -0
- data/rbi/orb/resources/alerts.rbi +59 -0
- data/rbi/orb/resources/dimensional_price_groups/prices.rbi +82 -0
- data/rbi/orb/resources/dimensional_price_groups.rbi +3 -0
- data/rbi/orb/resources/webhook_endpoints.rbi +116 -0
- data/rbi/orb/resources/webhooks.rbi +2 -0
- data/sig/orb/client.rbs +2 -0
- data/sig/orb/models/alert_create_for_plan_params.rbs +126 -0
- data/sig/orb/models/backfill_reflected_webhook_event.rbs +16 -0
- data/sig/orb/models/backfill_reverted_webhook_event.rbs +16 -0
- data/sig/orb/models/billable_metric_edited_webhook_event.rbs +16 -0
- data/sig/orb/models/credit_block_accounting_sync_failed_webhook_event.rbs +16 -0
- data/sig/orb/models/credit_block_accounting_sync_succeeded_webhook_event.rbs +16 -0
- data/sig/orb/models/credit_note_accounting_sync_failed_webhook_event.rbs +16 -0
- data/sig/orb/models/credit_note_accounting_sync_succeeded_webhook_event.rbs +16 -0
- data/sig/orb/models/credit_note_issued_webhook_event.rbs +16 -0
- data/sig/orb/models/credit_note_marked_as_void_webhook_event.rbs +16 -0
- data/sig/orb/models/customer_accounting_sync_failed_webhook_event.rbs +16 -0
- data/sig/orb/models/customer_accounting_sync_succeeded_webhook_event.rbs +16 -0
- data/sig/orb/models/customer_balance_transaction_created_webhook_event.rbs +16 -0
- data/sig/orb/models/customer_created_webhook_event.rbs +16 -0
- data/sig/orb/models/customer_credit_balance_depleted_webhook_event.rbs +16 -0
- data/sig/orb/models/customer_credit_balance_dropped_webhook_event.rbs +16 -0
- data/sig/orb/models/customer_credit_balance_recovered_webhook_event.rbs +16 -0
- data/sig/orb/models/customer_credit_ledger_incremented_webhook_event.rbs +16 -0
- data/sig/orb/models/customer_edited_webhook_event.rbs +16 -0
- data/sig/orb/models/data_exports_transfer_error_webhook_event.rbs +16 -0
- data/sig/orb/models/data_exports_transfer_success_webhook_event.rbs +16 -0
- data/sig/orb/models/dimensional_price_groups/price_create_params.rbs +123 -0
- data/sig/orb/models/dimensional_price_groups/price_create_response.rbs +15 -0
- data/sig/orb/models/dimensional_price_groups/price_list_params.rbs +61 -0
- data/sig/orb/models/event_unmatched_event_webhook_event.rbs +16 -0
- data/sig/orb/models/ingestion_unmatched_customer_ids_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_accounting_sync_failed_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_accounting_sync_succeeded_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_automation_schedule_step_executed_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_cost_data_exported_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_due_date_recalculation_canceled_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_due_date_recalculation_completed_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_due_date_recalculation_started_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_dunning_schedule_created_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_dunning_schedule_ended_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_dunning_schedule_reset_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_dunning_schedule_step_executed_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_edited_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_invoice_date_elapsed_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_issue_failed_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_issued_summary_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_issued_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_manually_marked_as_paid_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_manually_marked_as_void_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_payment_failed_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_payment_processing_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_payment_succeeded_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_sync_failed_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_sync_succeeded_webhook_event.rbs +16 -0
- data/sig/orb/models/invoice_undo_mark_as_paid_webhook_event.rbs +16 -0
- data/sig/orb/models/metric_events_dropped_by_watermark_webhook_event.rbs +16 -0
- data/sig/orb/models/payment_method_created_webhook_event.rbs +16 -0
- data/sig/orb/models/payment_method_deleted_webhook_event.rbs +16 -0
- data/sig/orb/models/plan_created_webhook_event.rbs +88 -0
- data/sig/orb/models/plan_default_version_set_webhook_event.rbs +16 -0
- data/sig/orb/models/plan_edited_webhook_event.rbs +132 -0
- data/sig/orb/models/plan_version_created_webhook_event.rbs +16 -0
- data/sig/orb/models/price_edited_webhook_event.rbs +16 -0
- data/sig/orb/models/resource_event_test_webhook_event.rbs +16 -0
- data/sig/orb/models/sales_order_accounting_sync_failed_webhook_event.rbs +16 -0
- data/sig/orb/models/sales_order_accounting_sync_succeeded_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_accounting_sync_failed_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_accounting_sync_succeeded_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_alert_disabled_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_cancellation_scheduled_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_cancellation_unscheduled_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_cost_exceeded_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_created_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_edited_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_ended_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_fixed_fee_quantity_updated_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_grouped_cost_exceeded_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_license_allocation_reset_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_license_balance_threshold_reached_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_plan_change_scheduled_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_plan_changed_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_plan_version_change_scheduled_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_plan_version_changed_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_spend_exceeded_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_started_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_trial_ended_webhook_event.rbs +16 -0
- data/sig/orb/models/subscription_usage_exceeded_webhook_event.rbs +16 -0
- data/sig/orb/models/tax_amount.rbs +31 -3
- data/sig/orb/models/transaction_accounting_sync_failed_webhook_event.rbs +16 -0
- data/sig/orb/models/transaction_accounting_sync_succeeded_webhook_event.rbs +16 -0
- data/sig/orb/models/unwrap_webhook_event.rbs +2 -0
- data/sig/orb/models/webhook_endpoint.rbs +40 -0
- data/sig/orb/models/webhook_endpoint_create_params.rbs +28 -0
- data/sig/orb/models/webhook_endpoint_delete_params.rbs +23 -0
- data/sig/orb/models/webhook_endpoint_disable_params.rbs +23 -0
- data/sig/orb/models/webhook_endpoint_enable_params.rbs +23 -0
- data/sig/orb/models/webhook_endpoint_list_params.rbs +30 -0
- data/sig/orb/models/webhook_endpoint_retrieve_params.rbs +23 -0
- data/sig/orb/models/webhook_endpoint_update_params.rbs +36 -0
- data/sig/orb/models/webhook_endpoint_with_secret.rbs +45 -0
- data/sig/orb/models.rbs +24 -0
- data/sig/orb/resources/alerts.rbs +12 -0
- data/sig/orb/resources/dimensional_price_groups/prices.rbs +28 -0
- data/sig/orb/resources/dimensional_price_groups.rbs +2 -0
- data/sig/orb/resources/webhook_endpoints.rbs +46 -0
- data/sig/orb/resources/webhooks.rbs +2 -0
- metadata +52 -1
|
@@ -34,6 +34,15 @@ module Orb
|
|
|
34
34
|
sig { returns(Time) }
|
|
35
35
|
attr_accessor :created_at
|
|
36
36
|
|
|
37
|
+
# The serialization style this payload was rendered in, as configured on the
|
|
38
|
+
# endpoint.
|
|
39
|
+
sig do
|
|
40
|
+
returns(
|
|
41
|
+
Orb::TransactionAccountingSyncSucceededWebhookEvent::PayloadStyle::TaggedSymbol
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
attr_accessor :payload_style
|
|
45
|
+
|
|
37
46
|
sig do
|
|
38
47
|
returns(Orb::TransactionAccountingSyncSucceededWebhookEvent::Properties)
|
|
39
48
|
end
|
|
@@ -77,6 +86,8 @@ module Orb
|
|
|
77
86
|
accounting_sync_record:
|
|
78
87
|
Orb::TransactionAccountingSyncSucceededWebhookEvent::AccountingSyncRecord::OrHash,
|
|
79
88
|
created_at: Time,
|
|
89
|
+
payload_style:
|
|
90
|
+
Orb::TransactionAccountingSyncSucceededWebhookEvent::PayloadStyle::OrSymbol,
|
|
80
91
|
properties:
|
|
81
92
|
Orb::TransactionAccountingSyncSucceededWebhookEvent::Properties::OrHash,
|
|
82
93
|
transaction:
|
|
@@ -91,6 +102,9 @@ module Orb
|
|
|
91
102
|
accounting_sync_record:,
|
|
92
103
|
# The time at which this event was created, to the second.
|
|
93
104
|
created_at:,
|
|
105
|
+
# The serialization style this payload was rendered in, as configured on the
|
|
106
|
+
# endpoint.
|
|
107
|
+
payload_style:,
|
|
94
108
|
properties:,
|
|
95
109
|
transaction:,
|
|
96
110
|
# The event this payload describes.
|
|
@@ -105,6 +119,8 @@ module Orb
|
|
|
105
119
|
accounting_sync_record:
|
|
106
120
|
Orb::TransactionAccountingSyncSucceededWebhookEvent::AccountingSyncRecord,
|
|
107
121
|
created_at: Time,
|
|
122
|
+
payload_style:
|
|
123
|
+
Orb::TransactionAccountingSyncSucceededWebhookEvent::PayloadStyle::TaggedSymbol,
|
|
108
124
|
properties:
|
|
109
125
|
Orb::TransactionAccountingSyncSucceededWebhookEvent::Properties,
|
|
110
126
|
transaction:
|
|
@@ -262,6 +278,42 @@ module Orb
|
|
|
262
278
|
end
|
|
263
279
|
end
|
|
264
280
|
|
|
281
|
+
# The serialization style this payload was rendered in, as configured on the
|
|
282
|
+
# endpoint.
|
|
283
|
+
module PayloadStyle
|
|
284
|
+
extend Orb::Internal::Type::Enum
|
|
285
|
+
|
|
286
|
+
TaggedSymbol =
|
|
287
|
+
T.type_alias do
|
|
288
|
+
T.all(
|
|
289
|
+
Symbol,
|
|
290
|
+
Orb::TransactionAccountingSyncSucceededWebhookEvent::PayloadStyle
|
|
291
|
+
)
|
|
292
|
+
end
|
|
293
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
294
|
+
|
|
295
|
+
EXPANDED =
|
|
296
|
+
T.let(
|
|
297
|
+
:expanded,
|
|
298
|
+
Orb::TransactionAccountingSyncSucceededWebhookEvent::PayloadStyle::TaggedSymbol
|
|
299
|
+
)
|
|
300
|
+
STANDARD =
|
|
301
|
+
T.let(
|
|
302
|
+
:standard,
|
|
303
|
+
Orb::TransactionAccountingSyncSucceededWebhookEvent::PayloadStyle::TaggedSymbol
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
sig do
|
|
307
|
+
override.returns(
|
|
308
|
+
T::Array[
|
|
309
|
+
Orb::TransactionAccountingSyncSucceededWebhookEvent::PayloadStyle::TaggedSymbol
|
|
310
|
+
]
|
|
311
|
+
)
|
|
312
|
+
end
|
|
313
|
+
def self.values
|
|
314
|
+
end
|
|
315
|
+
end
|
|
316
|
+
|
|
265
317
|
class Properties < Orb::Internal::Type::BaseModel
|
|
266
318
|
OrHash =
|
|
267
319
|
T.type_alias do
|
|
@@ -58,7 +58,9 @@ module Orb
|
|
|
58
58
|
Orb::MetricEventsDroppedByWatermarkWebhookEvent,
|
|
59
59
|
Orb::PaymentMethodCreatedWebhookEvent,
|
|
60
60
|
Orb::PaymentMethodDeletedWebhookEvent,
|
|
61
|
+
Orb::PlanCreatedWebhookEvent,
|
|
61
62
|
Orb::PlanDefaultVersionSetWebhookEvent,
|
|
63
|
+
Orb::PlanEditedWebhookEvent,
|
|
62
64
|
Orb::PlanVersionCreatedWebhookEvent,
|
|
63
65
|
Orb::PriceEditedWebhookEvent,
|
|
64
66
|
Orb::ResourceEventTestWebhookEvent,
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
class WebhookEndpoint < Orb::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias { T.any(Orb::WebhookEndpoint, Orb::Internal::AnyHash) }
|
|
8
|
+
|
|
9
|
+
# The Orb-assigned unique identifier for the webhook endpoint.
|
|
10
|
+
sig { returns(String) }
|
|
11
|
+
attr_accessor :id
|
|
12
|
+
|
|
13
|
+
# The time the webhook endpoint was created.
|
|
14
|
+
sig { returns(Time) }
|
|
15
|
+
attr_accessor :created_at
|
|
16
|
+
|
|
17
|
+
# Whether Orb sends webhook events to this endpoint.
|
|
18
|
+
sig { returns(T::Boolean) }
|
|
19
|
+
attr_accessor :enabled
|
|
20
|
+
|
|
21
|
+
# The webhook event types sent to this endpoint. If null, all event types are
|
|
22
|
+
# sent.
|
|
23
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
24
|
+
attr_accessor :enabled_event_types
|
|
25
|
+
|
|
26
|
+
# The HTTPS URL that Orb sends webhook events to.
|
|
27
|
+
sig { returns(String) }
|
|
28
|
+
attr_accessor :url
|
|
29
|
+
|
|
30
|
+
# A webhook endpoint is an HTTPS URL that Orb sends
|
|
31
|
+
# [webhook events](/integrations-and-exports/webhooks) to.
|
|
32
|
+
sig do
|
|
33
|
+
params(
|
|
34
|
+
id: String,
|
|
35
|
+
created_at: Time,
|
|
36
|
+
enabled: T::Boolean,
|
|
37
|
+
enabled_event_types: T.nilable(T::Array[String]),
|
|
38
|
+
url: String
|
|
39
|
+
).returns(T.attached_class)
|
|
40
|
+
end
|
|
41
|
+
def self.new(
|
|
42
|
+
# The Orb-assigned unique identifier for the webhook endpoint.
|
|
43
|
+
id:,
|
|
44
|
+
# The time the webhook endpoint was created.
|
|
45
|
+
created_at:,
|
|
46
|
+
# Whether Orb sends webhook events to this endpoint.
|
|
47
|
+
enabled:,
|
|
48
|
+
# The webhook event types sent to this endpoint. If null, all event types are
|
|
49
|
+
# sent.
|
|
50
|
+
enabled_event_types:,
|
|
51
|
+
# The HTTPS URL that Orb sends webhook events to.
|
|
52
|
+
url:
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
sig do
|
|
57
|
+
override.returns(
|
|
58
|
+
{
|
|
59
|
+
id: String,
|
|
60
|
+
created_at: Time,
|
|
61
|
+
enabled: T::Boolean,
|
|
62
|
+
enabled_event_types: T.nilable(T::Array[String]),
|
|
63
|
+
url: String
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
def to_hash
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
class WebhookEndpointCreateParams < 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::WebhookEndpointCreateParams, Orb::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The HTTPS URL that Orb sends webhook events to.
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :url
|
|
17
|
+
|
|
18
|
+
# The webhook event types to send to this endpoint. If omitted or null, all event
|
|
19
|
+
# types are sent.
|
|
20
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
21
|
+
attr_accessor :enabled_event_types
|
|
22
|
+
|
|
23
|
+
sig do
|
|
24
|
+
params(
|
|
25
|
+
url: String,
|
|
26
|
+
enabled_event_types: T.nilable(T::Array[String]),
|
|
27
|
+
request_options: Orb::RequestOptions::OrHash
|
|
28
|
+
).returns(T.attached_class)
|
|
29
|
+
end
|
|
30
|
+
def self.new(
|
|
31
|
+
# The HTTPS URL that Orb sends webhook events to.
|
|
32
|
+
url:,
|
|
33
|
+
# The webhook event types to send to this endpoint. If omitted or null, all event
|
|
34
|
+
# types are sent.
|
|
35
|
+
enabled_event_types: nil,
|
|
36
|
+
request_options: {}
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
sig do
|
|
41
|
+
override.returns(
|
|
42
|
+
{
|
|
43
|
+
url: String,
|
|
44
|
+
enabled_event_types: T.nilable(T::Array[String]),
|
|
45
|
+
request_options: Orb::RequestOptions
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
def to_hash
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
class WebhookEndpointDeleteParams < 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::WebhookEndpointDeleteParams, Orb::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :webhook_endpoint_id
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(
|
|
19
|
+
webhook_endpoint_id: String,
|
|
20
|
+
request_options: Orb::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
22
|
+
end
|
|
23
|
+
def self.new(webhook_endpoint_id:, request_options: {})
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ webhook_endpoint_id: String, request_options: Orb::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
def to_hash
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
class WebhookEndpointDisableParams < 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::WebhookEndpointDisableParams, Orb::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :webhook_endpoint_id
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(
|
|
19
|
+
webhook_endpoint_id: String,
|
|
20
|
+
request_options: Orb::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
22
|
+
end
|
|
23
|
+
def self.new(webhook_endpoint_id:, request_options: {})
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ webhook_endpoint_id: String, request_options: Orb::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
def to_hash
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
class WebhookEndpointEnableParams < 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::WebhookEndpointEnableParams, Orb::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :webhook_endpoint_id
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(
|
|
19
|
+
webhook_endpoint_id: String,
|
|
20
|
+
request_options: Orb::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
22
|
+
end
|
|
23
|
+
def self.new(webhook_endpoint_id:, request_options: {})
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ webhook_endpoint_id: String, request_options: Orb::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
def to_hash
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
class WebhookEndpointListParams < 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::WebhookEndpointListParams, Orb::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Cursor for pagination. This can be populated by the `next_cursor` value returned
|
|
15
|
+
# from the initial request.
|
|
16
|
+
sig { returns(T.nilable(String)) }
|
|
17
|
+
attr_accessor :cursor
|
|
18
|
+
|
|
19
|
+
# The number of items to fetch. Defaults to 20.
|
|
20
|
+
sig { returns(T.nilable(Integer)) }
|
|
21
|
+
attr_reader :limit
|
|
22
|
+
|
|
23
|
+
sig { params(limit: Integer).void }
|
|
24
|
+
attr_writer :limit
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
params(
|
|
28
|
+
cursor: T.nilable(String),
|
|
29
|
+
limit: Integer,
|
|
30
|
+
request_options: Orb::RequestOptions::OrHash
|
|
31
|
+
).returns(T.attached_class)
|
|
32
|
+
end
|
|
33
|
+
def self.new(
|
|
34
|
+
# Cursor for pagination. This can be populated by the `next_cursor` value returned
|
|
35
|
+
# from the initial request.
|
|
36
|
+
cursor: nil,
|
|
37
|
+
# The number of items to fetch. Defaults to 20.
|
|
38
|
+
limit: nil,
|
|
39
|
+
request_options: {}
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
sig do
|
|
44
|
+
override.returns(
|
|
45
|
+
{
|
|
46
|
+
cursor: T.nilable(String),
|
|
47
|
+
limit: Integer,
|
|
48
|
+
request_options: Orb::RequestOptions
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
def to_hash
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
class WebhookEndpointRetrieveParams < 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::WebhookEndpointRetrieveParams, Orb::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :webhook_endpoint_id
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(
|
|
19
|
+
webhook_endpoint_id: String,
|
|
20
|
+
request_options: Orb::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
22
|
+
end
|
|
23
|
+
def self.new(webhook_endpoint_id:, request_options: {})
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ webhook_endpoint_id: String, request_options: Orb::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
def to_hash
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
class WebhookEndpointUpdateParams < 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::WebhookEndpointUpdateParams, Orb::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :webhook_endpoint_id
|
|
16
|
+
|
|
17
|
+
# The webhook event types to send to this endpoint. Null sends all event types;
|
|
18
|
+
# omit to leave them unchanged.
|
|
19
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
20
|
+
attr_accessor :enabled_event_types
|
|
21
|
+
|
|
22
|
+
# The HTTPS URL that Orb sends webhook events to.
|
|
23
|
+
sig { returns(T.nilable(String)) }
|
|
24
|
+
attr_accessor :url
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
params(
|
|
28
|
+
webhook_endpoint_id: String,
|
|
29
|
+
enabled_event_types: T.nilable(T::Array[String]),
|
|
30
|
+
url: T.nilable(String),
|
|
31
|
+
request_options: Orb::RequestOptions::OrHash
|
|
32
|
+
).returns(T.attached_class)
|
|
33
|
+
end
|
|
34
|
+
def self.new(
|
|
35
|
+
webhook_endpoint_id:,
|
|
36
|
+
# The webhook event types to send to this endpoint. Null sends all event types;
|
|
37
|
+
# omit to leave them unchanged.
|
|
38
|
+
enabled_event_types: nil,
|
|
39
|
+
# The HTTPS URL that Orb sends webhook events to.
|
|
40
|
+
url: nil,
|
|
41
|
+
request_options: {}
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
sig do
|
|
46
|
+
override.returns(
|
|
47
|
+
{
|
|
48
|
+
webhook_endpoint_id: String,
|
|
49
|
+
enabled_event_types: T.nilable(T::Array[String]),
|
|
50
|
+
url: T.nilable(String),
|
|
51
|
+
request_options: Orb::RequestOptions
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
def to_hash
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
class WebhookEndpointWithSecret < Orb::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Orb::WebhookEndpointWithSecret, Orb::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# The Orb-assigned unique identifier for the webhook endpoint.
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
attr_accessor :id
|
|
14
|
+
|
|
15
|
+
# The time the webhook endpoint was created.
|
|
16
|
+
sig { returns(Time) }
|
|
17
|
+
attr_accessor :created_at
|
|
18
|
+
|
|
19
|
+
# Whether Orb sends webhook events to this endpoint.
|
|
20
|
+
sig { returns(T::Boolean) }
|
|
21
|
+
attr_accessor :enabled
|
|
22
|
+
|
|
23
|
+
# The webhook event types sent to this endpoint. If null, all event types are
|
|
24
|
+
# sent.
|
|
25
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
26
|
+
attr_accessor :enabled_event_types
|
|
27
|
+
|
|
28
|
+
# The secret used to sign the webhook events sent to this endpoint. Only returned
|
|
29
|
+
# when the endpoint is created.
|
|
30
|
+
sig { returns(String) }
|
|
31
|
+
attr_accessor :secret
|
|
32
|
+
|
|
33
|
+
# The HTTPS URL that Orb sends webhook events to.
|
|
34
|
+
sig { returns(String) }
|
|
35
|
+
attr_accessor :url
|
|
36
|
+
|
|
37
|
+
# A newly created webhook endpoint, along with the secret used to sign its webhook
|
|
38
|
+
# events.
|
|
39
|
+
sig do
|
|
40
|
+
params(
|
|
41
|
+
id: String,
|
|
42
|
+
created_at: Time,
|
|
43
|
+
enabled: T::Boolean,
|
|
44
|
+
enabled_event_types: T.nilable(T::Array[String]),
|
|
45
|
+
secret: String,
|
|
46
|
+
url: String
|
|
47
|
+
).returns(T.attached_class)
|
|
48
|
+
end
|
|
49
|
+
def self.new(
|
|
50
|
+
# The Orb-assigned unique identifier for the webhook endpoint.
|
|
51
|
+
id:,
|
|
52
|
+
# The time the webhook endpoint was created.
|
|
53
|
+
created_at:,
|
|
54
|
+
# Whether Orb sends webhook events to this endpoint.
|
|
55
|
+
enabled:,
|
|
56
|
+
# The webhook event types sent to this endpoint. If null, all event types are
|
|
57
|
+
# sent.
|
|
58
|
+
enabled_event_types:,
|
|
59
|
+
# The secret used to sign the webhook events sent to this endpoint. Only returned
|
|
60
|
+
# when the endpoint is created.
|
|
61
|
+
secret:,
|
|
62
|
+
# The HTTPS URL that Orb sends webhook events to.
|
|
63
|
+
url:
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
sig do
|
|
68
|
+
override.returns(
|
|
69
|
+
{
|
|
70
|
+
id: String,
|
|
71
|
+
created_at: Time,
|
|
72
|
+
enabled: T::Boolean,
|
|
73
|
+
enabled_event_types: T.nilable(T::Array[String]),
|
|
74
|
+
secret: String,
|
|
75
|
+
url: String
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
end
|
|
79
|
+
def to_hash
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
data/rbi/orb/models.rbi
CHANGED
|
@@ -18,6 +18,8 @@ module Orb
|
|
|
18
18
|
AlertCreateForExternalCustomerParams =
|
|
19
19
|
Orb::Models::AlertCreateForExternalCustomerParams
|
|
20
20
|
|
|
21
|
+
AlertCreateForPlanParams = Orb::Models::AlertCreateForPlanParams
|
|
22
|
+
|
|
21
23
|
AlertCreateForSubscriptionParams =
|
|
22
24
|
Orb::Models::AlertCreateForSubscriptionParams
|
|
23
25
|
|
|
@@ -668,11 +670,15 @@ module Orb
|
|
|
668
670
|
|
|
669
671
|
Plan = Orb::Models::Plan
|
|
670
672
|
|
|
673
|
+
PlanCreatedWebhookEvent = Orb::Models::PlanCreatedWebhookEvent
|
|
674
|
+
|
|
671
675
|
PlanCreateParams = Orb::Models::PlanCreateParams
|
|
672
676
|
|
|
673
677
|
PlanDefaultVersionSetWebhookEvent =
|
|
674
678
|
Orb::Models::PlanDefaultVersionSetWebhookEvent
|
|
675
679
|
|
|
680
|
+
PlanEditedWebhookEvent = Orb::Models::PlanEditedWebhookEvent
|
|
681
|
+
|
|
676
682
|
PlanFetchParams = Orb::Models::PlanFetchParams
|
|
677
683
|
|
|
678
684
|
PlanListParams = Orb::Models::PlanListParams
|
|
@@ -890,5 +896,23 @@ module Orb
|
|
|
890
896
|
|
|
891
897
|
UsageDiscountInterval = Orb::Models::UsageDiscountInterval
|
|
892
898
|
|
|
899
|
+
WebhookEndpoint = Orb::Models::WebhookEndpoint
|
|
900
|
+
|
|
901
|
+
WebhookEndpointCreateParams = Orb::Models::WebhookEndpointCreateParams
|
|
902
|
+
|
|
903
|
+
WebhookEndpointDeleteParams = Orb::Models::WebhookEndpointDeleteParams
|
|
904
|
+
|
|
905
|
+
WebhookEndpointDisableParams = Orb::Models::WebhookEndpointDisableParams
|
|
906
|
+
|
|
907
|
+
WebhookEndpointEnableParams = Orb::Models::WebhookEndpointEnableParams
|
|
908
|
+
|
|
909
|
+
WebhookEndpointListParams = Orb::Models::WebhookEndpointListParams
|
|
910
|
+
|
|
911
|
+
WebhookEndpointRetrieveParams = Orb::Models::WebhookEndpointRetrieveParams
|
|
912
|
+
|
|
913
|
+
WebhookEndpointUpdateParams = Orb::Models::WebhookEndpointUpdateParams
|
|
914
|
+
|
|
915
|
+
WebhookEndpointWithSecret = Orb::Models::WebhookEndpointWithSecret
|
|
916
|
+
|
|
893
917
|
WebhookUnwrapParams = Orb::Models::WebhookUnwrapParams
|
|
894
918
|
end
|
|
@@ -172,6 +172,65 @@ module Orb
|
|
|
172
172
|
)
|
|
173
173
|
end
|
|
174
174
|
|
|
175
|
+
# This endpoint is used to create alerts at the plan level. Plan level alerts are
|
|
176
|
+
# automatically propagated to all subscriptions associated with the plan. These
|
|
177
|
+
# alerts are scoped to a specific plan version; if no version is specified, the
|
|
178
|
+
# active plan version is used.
|
|
179
|
+
#
|
|
180
|
+
# Plan level alerts can be of three types: `usage_exceeded`, `cost_exceeded`, or
|
|
181
|
+
# `spend_exceeded`. A `usage_exceeded` alert is scoped to a particular metric and
|
|
182
|
+
# is triggered when the usage of that metric exceeds predefined thresholds during
|
|
183
|
+
# the current billing cycle. A `cost_exceeded` alert is triggered when the total
|
|
184
|
+
# amount due during the current billing cycle surpasses predefined thresholds.
|
|
185
|
+
# `cost_exceeded` alerts do not include burndown of pre-purchase credits. A
|
|
186
|
+
# `spend_exceeded` alert is triggered when the rated spend (the pricing subtotal,
|
|
187
|
+
# before invoice-level adjustments and credits) denominated in the alert's
|
|
188
|
+
# currency exceeds predefined thresholds during the current billing cycle;
|
|
189
|
+
# `price_filters` can scope which prices contribute. Each plan can have one
|
|
190
|
+
# `cost_exceeded` alert and one `usage_exceeded` alert per metric that is a part
|
|
191
|
+
# of the plan.
|
|
192
|
+
sig do
|
|
193
|
+
params(
|
|
194
|
+
plan_id: String,
|
|
195
|
+
thresholds: T::Array[Orb::Threshold::OrHash],
|
|
196
|
+
type: Orb::AlertCreateForPlanParams::Type::OrSymbol,
|
|
197
|
+
currency: T.nilable(String),
|
|
198
|
+
grouping_keys: T.nilable(T::Array[String]),
|
|
199
|
+
metric_id: T.nilable(String),
|
|
200
|
+
plan_version: T.nilable(Integer),
|
|
201
|
+
price_filters:
|
|
202
|
+
T.nilable(
|
|
203
|
+
T::Array[Orb::AlertCreateForPlanParams::PriceFilter::OrHash]
|
|
204
|
+
),
|
|
205
|
+
request_options: Orb::RequestOptions::OrHash
|
|
206
|
+
).returns(Orb::Alert)
|
|
207
|
+
end
|
|
208
|
+
def create_for_plan(
|
|
209
|
+
plan_id,
|
|
210
|
+
# The thresholds that define the values at which the alert will be triggered.
|
|
211
|
+
thresholds:,
|
|
212
|
+
# The type of alert to create. This must be a valid alert type.
|
|
213
|
+
type:,
|
|
214
|
+
# The case sensitive currency or custom pricing unit the alert is denominated in.
|
|
215
|
+
# Required for spend_exceeded alerts and when grouping_keys is set.
|
|
216
|
+
currency: nil,
|
|
217
|
+
# The property keys to group cost alerts by. Only applicable for cost_exceeded
|
|
218
|
+
# alerts.
|
|
219
|
+
grouping_keys: nil,
|
|
220
|
+
# The metric to track usage for.
|
|
221
|
+
metric_id: nil,
|
|
222
|
+
# The plan version to create alerts for. If not specified, the default will be the
|
|
223
|
+
# plan's active plan version.
|
|
224
|
+
plan_version: nil,
|
|
225
|
+
# Filters to scope which prices are included in alert evaluation. Supports
|
|
226
|
+
# filtering by price_id, item_id, or price_type with includes/excludes operators.
|
|
227
|
+
# Only applicable to spend_exceeded alerts and to cost_exceeded alerts with
|
|
228
|
+
# grouping_keys set.
|
|
229
|
+
price_filters: nil,
|
|
230
|
+
request_options: {}
|
|
231
|
+
)
|
|
232
|
+
end
|
|
233
|
+
|
|
175
234
|
# This endpoint is used to create alerts at the subscription level.
|
|
176
235
|
#
|
|
177
236
|
# Subscription level alerts can be one of three types: `usage_exceeded`,
|