orb-billing 1.14.0 → 1.15.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 +12 -0
- data/lib/orb/client.rb +14 -0
- data/lib/orb/internal/transport/base_client.rb +5 -0
- data/lib/orb/internal/type/union.rb +13 -27
- data/lib/orb/models/accounting_provider_config.rb +14 -3
- data/lib/orb/models/adjustment_interval.rb +185 -3
- data/lib/orb/models/alert.rb +105 -1
- data/lib/orb/models/alert_create_for_subscription_params.rb +120 -7
- data/lib/orb/models/alert_update_params.rb +113 -1
- data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +2419 -17109
- data/lib/orb/models/beta_create_plan_version_params.rb +2361 -16947
- data/lib/orb/models/changed_subscription_resources.rb +200 -10
- data/lib/orb/models/conversion_rate_config.rb +18 -0
- data/lib/orb/models/credit_block_list_invoices_response.rb +155 -1
- data/lib/orb/models/credit_block_retrieve_response.rb +150 -1
- data/lib/orb/models/customer.rb +111 -4
- data/lib/orb/models/customer_create_params.rb +6 -1
- data/lib/orb/models/customer_tax_id.rb +15 -1
- data/lib/orb/models/customer_update_by_external_id_params.rb +16 -2
- data/lib/orb/models/customer_update_params.rb +16 -2
- data/lib/orb/models/customers/credit_list_by_external_id_response.rb +155 -1
- data/lib/orb/models/customers/credit_list_response.rb +152 -1
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +4 -4
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +4 -4
- data/lib/orb/models/dimensional_price_group.rb +1 -1
- data/lib/orb/models/discount.rb +145 -1
- data/lib/orb/models/event_ingest_params.rb +5 -2
- data/lib/orb/models/invoice.rb +198 -10
- data/lib/orb/models/invoice_create_params.rb +6 -5
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +200 -10
- data/lib/orb/models/invoice_issue_summary_response.rb +9 -3
- data/lib/orb/models/invoice_level_discount.rb +145 -1
- data/lib/orb/models/invoice_line_item_create_response.rb +189 -5
- data/lib/orb/models/invoice_list_summary_response.rb +9 -3
- data/lib/orb/models/licenses/external_license_get_usage_params.rb +3 -3
- data/lib/orb/models/licenses/usage_get_all_usage_params.rb +3 -3
- data/lib/orb/models/licenses/usage_get_usage_params.rb +3 -3
- data/lib/orb/models/mutated_subscription.rb +169 -4
- data/lib/orb/models/new_allocation_price.rb +11 -1
- data/lib/orb/models/new_floating_bulk_price.rb +1 -3
- data/lib/orb/models/new_floating_bulk_with_proration_price.rb +1 -3
- data/lib/orb/models/new_floating_cumulative_grouped_bulk_price.rb +1 -3
- data/lib/orb/models/new_floating_grouped_allocation_price.rb +1 -3
- data/lib/orb/models/new_floating_grouped_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_floating_grouped_tiered_price.rb +1 -3
- data/lib/orb/models/new_floating_grouped_with_metered_minimum_price.rb +1 -3
- data/lib/orb/models/new_floating_grouped_with_prorated_minimum_price.rb +1 -3
- data/lib/orb/models/new_floating_matrix_price.rb +1 -3
- data/lib/orb/models/new_floating_matrix_with_allocation_price.rb +1 -3
- data/lib/orb/models/new_floating_matrix_with_display_name_price.rb +1 -3
- data/lib/orb/models/new_floating_max_group_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_floating_minimum_composite_price.rb +1 -3
- data/lib/orb/models/new_floating_package_price.rb +1 -3
- data/lib/orb/models/new_floating_package_with_allocation_price.rb +1 -3
- data/lib/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rb +1 -3
- data/lib/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rb +1 -3
- data/lib/orb/models/new_floating_threshold_total_amount_price.rb +1 -3
- data/lib/orb/models/new_floating_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_floating_tiered_package_with_minimum_price.rb +1 -3
- data/lib/orb/models/new_floating_tiered_price.rb +1 -3
- data/lib/orb/models/new_floating_tiered_with_minimum_price.rb +1 -3
- data/lib/orb/models/new_floating_tiered_with_proration_price.rb +1 -3
- data/lib/orb/models/new_floating_unit_price.rb +1 -3
- data/lib/orb/models/new_floating_unit_with_percent_price.rb +1 -3
- data/lib/orb/models/new_floating_unit_with_proration_price.rb +1 -3
- data/lib/orb/models/new_plan_bulk_price.rb +1 -1
- data/lib/orb/models/new_plan_bulk_with_proration_price.rb +1 -3
- data/lib/orb/models/new_plan_cumulative_grouped_bulk_price.rb +1 -3
- data/lib/orb/models/new_plan_grouped_allocation_price.rb +1 -3
- data/lib/orb/models/new_plan_grouped_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_plan_grouped_tiered_price.rb +1 -3
- data/lib/orb/models/new_plan_grouped_with_metered_minimum_price.rb +1 -3
- data/lib/orb/models/new_plan_grouped_with_prorated_minimum_price.rb +1 -3
- data/lib/orb/models/new_plan_matrix_price.rb +1 -5
- data/lib/orb/models/new_plan_matrix_with_allocation_price.rb +1 -3
- data/lib/orb/models/new_plan_matrix_with_display_name_price.rb +1 -3
- data/lib/orb/models/new_plan_max_group_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_plan_minimum_composite_price.rb +1 -3
- data/lib/orb/models/new_plan_package_price.rb +1 -5
- data/lib/orb/models/new_plan_package_with_allocation_price.rb +1 -3
- data/lib/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rb +1 -3
- data/lib/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rb +1 -3
- data/lib/orb/models/new_plan_threshold_total_amount_price.rb +1 -3
- data/lib/orb/models/new_plan_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_plan_tiered_package_with_minimum_price.rb +1 -3
- data/lib/orb/models/new_plan_tiered_price.rb +1 -5
- data/lib/orb/models/new_plan_tiered_with_minimum_price.rb +1 -3
- data/lib/orb/models/new_plan_unit_price.rb +1 -1
- data/lib/orb/models/new_plan_unit_with_percent_price.rb +1 -3
- data/lib/orb/models/new_plan_unit_with_proration_price.rb +1 -3
- data/lib/orb/models/new_subscription_bulk_price.rb +1 -3
- data/lib/orb/models/new_subscription_bulk_with_proration_price.rb +1 -3
- data/lib/orb/models/new_subscription_cumulative_grouped_bulk_price.rb +1 -3
- data/lib/orb/models/new_subscription_grouped_allocation_price.rb +1 -3
- data/lib/orb/models/new_subscription_grouped_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_subscription_grouped_tiered_price.rb +1 -3
- data/lib/orb/models/new_subscription_grouped_with_metered_minimum_price.rb +1 -3
- data/lib/orb/models/new_subscription_grouped_with_prorated_minimum_price.rb +1 -3
- data/lib/orb/models/new_subscription_matrix_price.rb +1 -3
- data/lib/orb/models/new_subscription_matrix_with_allocation_price.rb +1 -3
- data/lib/orb/models/new_subscription_matrix_with_display_name_price.rb +1 -3
- data/lib/orb/models/new_subscription_max_group_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_subscription_minimum_composite_price.rb +1 -3
- data/lib/orb/models/new_subscription_package_price.rb +1 -3
- data/lib/orb/models/new_subscription_package_with_allocation_price.rb +1 -3
- data/lib/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rb +1 -3
- data/lib/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rb +1 -3
- data/lib/orb/models/new_subscription_threshold_total_amount_price.rb +1 -3
- data/lib/orb/models/new_subscription_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_subscription_tiered_package_with_minimum_price.rb +1 -3
- data/lib/orb/models/new_subscription_tiered_price.rb +1 -3
- data/lib/orb/models/new_subscription_tiered_with_minimum_price.rb +1 -3
- data/lib/orb/models/new_subscription_unit_price.rb +1 -3
- data/lib/orb/models/new_subscription_unit_with_percent_price.rb +1 -3
- data/lib/orb/models/new_subscription_unit_with_proration_price.rb +1 -3
- data/lib/orb/models/per_price_cost.rb +2 -2
- data/lib/orb/models/plan.rb +189 -9
- data/lib/orb/models/plan_create_params.rb +1047 -8228
- data/lib/orb/models/plan_update_params.rb +9 -1
- data/lib/orb/models/plan_version.rb +186 -5
- data/lib/orb/models/plans/external_plan_id_update_params.rb +9 -1
- data/lib/orb/models/plans/migration_cancel_response.rb +22 -4
- data/lib/orb/models/plans/migration_list_response.rb +22 -4
- data/lib/orb/models/plans/migration_retrieve_response.rb +22 -4
- data/lib/orb/models/price.rb +2614 -1268
- data/lib/orb/models/price_create_params.rb +866 -49
- data/lib/orb/models/price_evaluate_multiple_params.rb +889 -54
- data/lib/orb/models/price_evaluate_preview_events_params.rb +881 -46
- data/lib/orb/models/price_interval.rb +2 -2
- data/lib/orb/models/subscription.rb +168 -4
- data/lib/orb/models/subscription_create_params.rb +2818 -674
- data/lib/orb/models/subscription_price_intervals_params.rb +1098 -57
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +2834 -687
- data/lib/orb/models/subscription_update_params.rb +12 -1
- data/lib/orb/models.rb +2 -0
- data/lib/orb/resources/alerts.rb +14 -3
- data/lib/orb/resources/customers/credits/ledger.rb +28 -14
- data/lib/orb/resources/customers.rb +6 -2
- data/lib/orb/resources/events.rb +7 -34
- data/lib/orb/resources/invoices.rb +6 -2
- data/lib/orb/resources/licenses/external_licenses.rb +1 -1
- data/lib/orb/resources/licenses/usage.rb +2 -2
- data/lib/orb/resources/metrics.rb +5 -5
- data/lib/orb/resources/plans/external_plan_id.rb +5 -3
- data/lib/orb/resources/plans.rb +9 -5
- data/lib/orb/resources/prices/external_price_id.rb +2 -2
- data/lib/orb/resources/prices.rb +5 -5
- data/lib/orb/resources/subscriptions.rb +20 -3
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +1 -0
- data/rbi/orb/models/accounting_provider_config.rbi +38 -5
- data/rbi/orb/models/adjustment_interval.rbi +336 -0
- data/rbi/orb/models/alert.rbi +172 -3
- data/rbi/orb/models/alert_create_for_subscription_params.rbi +268 -9
- data/rbi/orb/models/alert_update_params.rbi +208 -0
- data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +3833 -28395
- data/rbi/orb/models/beta_create_plan_version_params.rbi +3833 -28363
- data/rbi/orb/models/changed_subscription_resources.rbi +360 -5
- data/rbi/orb/models/conversion_rate_config.rbi +18 -0
- data/rbi/orb/models/credit_block_list_invoices_response.rbi +346 -3
- data/rbi/orb/models/credit_block_retrieve_response.rbi +344 -3
- data/rbi/orb/models/customer.rbi +190 -10
- data/rbi/orb/models/customer_create_params.rbi +12 -2
- data/rbi/orb/models/customer_tax_id.rbi +15 -1
- data/rbi/orb/models/customer_update_by_external_id_params.rbi +22 -2
- data/rbi/orb/models/customer_update_params.rbi +22 -2
- data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +346 -3
- data/rbi/orb/models/customers/credit_list_response.rbi +347 -3
- data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +6 -6
- data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +6 -6
- data/rbi/orb/models/dimensional_price_group.rbi +1 -1
- data/rbi/orb/models/discount.rbi +269 -1
- data/rbi/orb/models/event_ingest_params.rbi +4 -2
- data/rbi/orb/models/invoice.rbi +360 -5
- data/rbi/orb/models/invoice_create_params.rbi +12 -7
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +360 -5
- data/rbi/orb/models/invoice_issue_summary_response.rbi +19 -4
- data/rbi/orb/models/invoice_level_discount.rbi +298 -1
- data/rbi/orb/models/invoice_line_item_create_response.rbi +339 -0
- data/rbi/orb/models/invoice_list_summary_response.rbi +19 -4
- data/rbi/orb/models/licenses/external_license_get_usage_params.rbi +3 -3
- data/rbi/orb/models/licenses/usage_get_all_usage_params.rbi +3 -3
- data/rbi/orb/models/licenses/usage_get_usage_params.rbi +3 -3
- data/rbi/orb/models/mutated_subscription.rbi +324 -2
- data/rbi/orb/models/new_allocation_price.rbi +12 -0
- data/rbi/orb/models/per_price_cost.rbi +3 -0
- data/rbi/orb/models/plan.rbi +339 -2
- data/rbi/orb/models/plan_create_params.rbi +1877 -14138
- data/rbi/orb/models/plan_update_params.rbi +8 -0
- data/rbi/orb/models/plan_version.rbi +339 -0
- data/rbi/orb/models/plans/external_plan_id_update_params.rbi +8 -0
- data/rbi/orb/models/plans/migration_cancel_response.rbi +22 -1
- data/rbi/orb/models/plans/migration_list_response.rbi +22 -1
- data/rbi/orb/models/plans/migration_retrieve_response.rbi +22 -1
- data/rbi/orb/models/price.rbi +4552 -2285
- data/rbi/orb/models/price_create_params.rbi +1540 -114
- data/rbi/orb/models/price_evaluate_multiple_params.rbi +1540 -114
- data/rbi/orb/models/price_evaluate_preview_events_params.rbi +1540 -114
- data/rbi/orb/models/price_interval.rbi +3 -0
- data/rbi/orb/models/subscription.rbi +324 -2
- data/rbi/orb/models/subscription_create_params.rbi +4998 -1186
- data/rbi/orb/models/subscription_price_intervals_params.rbi +2127 -264
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +4997 -1185
- data/rbi/orb/models/subscription_update_params.rbi +14 -0
- data/rbi/orb/models.rbi +2 -0
- data/rbi/orb/resources/alerts.rbi +39 -4
- data/rbi/orb/resources/customers/credits/ledger.rbi +28 -14
- data/rbi/orb/resources/customers.rbi +23 -0
- data/rbi/orb/resources/events.rbi +8 -35
- data/rbi/orb/resources/invoices.rbi +9 -3
- data/rbi/orb/resources/licenses/external_licenses.rbi +1 -1
- data/rbi/orb/resources/licenses/usage.rbi +2 -2
- data/rbi/orb/resources/metrics.rbi +5 -5
- data/rbi/orb/resources/plans/external_plan_id.rbi +5 -2
- data/rbi/orb/resources/plans.rbi +9 -3
- data/rbi/orb/resources/prices.rbi +3 -0
- data/rbi/orb/resources/subscriptions.rbi +29 -0
- data/sig/orb/models/accounting_provider_config.rbs +21 -4
- data/sig/orb/models/adjustment_interval.rbs +134 -0
- data/sig/orb/models/alert.rbs +85 -3
- data/sig/orb/models/alert_create_for_subscription_params.rbs +86 -4
- data/sig/orb/models/alert_update_params.rbs +86 -1
- data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +1803 -11601
- data/sig/orb/models/beta_create_plan_version_params.rbs +1747 -11541
- data/sig/orb/models/changed_subscription_resources.rbs +140 -1
- data/sig/orb/models/conversion_rate_config.rbs +12 -0
- data/sig/orb/models/credit_block_list_invoices_response.rbs +124 -3
- data/sig/orb/models/credit_block_retrieve_response.rbs +124 -3
- data/sig/orb/models/customer.rbs +70 -4
- data/sig/orb/models/customer_create_params.rbs +2 -2
- data/sig/orb/models/customer_tax_id.rbs +20 -2
- data/sig/orb/models/customer_update_by_external_id_params.rbs +7 -2
- data/sig/orb/models/customer_update_params.rbs +7 -2
- data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +124 -3
- data/sig/orb/models/customers/credit_list_response.rbs +124 -3
- data/sig/orb/models/discount.rbs +114 -0
- data/sig/orb/models/invoice.rbs +140 -1
- data/sig/orb/models/invoice_fetch_upcoming_response.rbs +140 -1
- data/sig/orb/models/invoice_issue_summary_response.rbs +2 -1
- data/sig/orb/models/invoice_level_discount.rbs +117 -1
- data/sig/orb/models/invoice_line_item_create_response.rbs +134 -0
- data/sig/orb/models/invoice_list_summary_response.rbs +2 -1
- data/sig/orb/models/licenses/external_license_get_usage_params.rbs +4 -4
- data/sig/orb/models/licenses/usage_get_all_usage_params.rbs +4 -4
- data/sig/orb/models/licenses/usage_get_usage_params.rbs +4 -4
- data/sig/orb/models/mutated_subscription.rbs +124 -0
- data/sig/orb/models/new_allocation_price.rbs +5 -0
- data/sig/orb/models/new_floating_bulk_price.rbs +4 -4
- data/sig/orb/models/new_floating_bulk_with_proration_price.rbs +4 -4
- data/sig/orb/models/new_floating_cumulative_grouped_bulk_price.rbs +4 -4
- data/sig/orb/models/new_floating_grouped_allocation_price.rbs +4 -4
- data/sig/orb/models/new_floating_grouped_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_floating_grouped_tiered_price.rbs +4 -4
- data/sig/orb/models/new_floating_grouped_with_metered_minimum_price.rbs +4 -4
- data/sig/orb/models/new_floating_grouped_with_prorated_minimum_price.rbs +4 -4
- data/sig/orb/models/new_floating_matrix_price.rbs +4 -4
- data/sig/orb/models/new_floating_matrix_with_allocation_price.rbs +4 -4
- data/sig/orb/models/new_floating_matrix_with_display_name_price.rbs +4 -4
- data/sig/orb/models/new_floating_max_group_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_floating_minimum_composite_price.rbs +4 -4
- data/sig/orb/models/new_floating_package_price.rbs +4 -4
- data/sig/orb/models/new_floating_package_with_allocation_price.rbs +4 -4
- data/sig/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
- data/sig/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rbs +4 -4
- data/sig/orb/models/new_floating_threshold_total_amount_price.rbs +4 -4
- data/sig/orb/models/new_floating_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_floating_tiered_package_with_minimum_price.rbs +4 -4
- data/sig/orb/models/new_floating_tiered_price.rbs +4 -4
- data/sig/orb/models/new_floating_tiered_with_minimum_price.rbs +4 -4
- data/sig/orb/models/new_floating_tiered_with_proration_price.rbs +4 -4
- data/sig/orb/models/new_floating_unit_price.rbs +4 -4
- data/sig/orb/models/new_floating_unit_with_percent_price.rbs +4 -4
- data/sig/orb/models/new_floating_unit_with_proration_price.rbs +4 -4
- data/sig/orb/models/new_plan_bulk_price.rbs +4 -4
- data/sig/orb/models/new_plan_bulk_with_proration_price.rbs +4 -4
- data/sig/orb/models/new_plan_cumulative_grouped_bulk_price.rbs +4 -4
- data/sig/orb/models/new_plan_grouped_allocation_price.rbs +4 -4
- data/sig/orb/models/new_plan_grouped_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_plan_grouped_tiered_price.rbs +4 -4
- data/sig/orb/models/new_plan_grouped_with_metered_minimum_price.rbs +4 -4
- data/sig/orb/models/new_plan_grouped_with_prorated_minimum_price.rbs +4 -4
- data/sig/orb/models/new_plan_matrix_price.rbs +4 -4
- data/sig/orb/models/new_plan_matrix_with_allocation_price.rbs +4 -4
- data/sig/orb/models/new_plan_matrix_with_display_name_price.rbs +4 -4
- data/sig/orb/models/new_plan_max_group_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_plan_minimum_composite_price.rbs +4 -4
- data/sig/orb/models/new_plan_package_price.rbs +4 -4
- data/sig/orb/models/new_plan_package_with_allocation_price.rbs +4 -4
- data/sig/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
- data/sig/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rbs +4 -4
- data/sig/orb/models/new_plan_threshold_total_amount_price.rbs +4 -4
- data/sig/orb/models/new_plan_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_plan_tiered_package_with_minimum_price.rbs +4 -4
- data/sig/orb/models/new_plan_tiered_price.rbs +4 -4
- data/sig/orb/models/new_plan_tiered_with_minimum_price.rbs +4 -4
- data/sig/orb/models/new_plan_unit_price.rbs +4 -4
- data/sig/orb/models/new_plan_unit_with_percent_price.rbs +4 -4
- data/sig/orb/models/new_plan_unit_with_proration_price.rbs +4 -4
- data/sig/orb/models/new_subscription_bulk_price.rbs +4 -4
- data/sig/orb/models/new_subscription_bulk_with_proration_price.rbs +4 -4
- data/sig/orb/models/new_subscription_cumulative_grouped_bulk_price.rbs +4 -4
- data/sig/orb/models/new_subscription_grouped_allocation_price.rbs +4 -4
- data/sig/orb/models/new_subscription_grouped_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_subscription_grouped_tiered_price.rbs +4 -4
- data/sig/orb/models/new_subscription_grouped_with_metered_minimum_price.rbs +4 -4
- data/sig/orb/models/new_subscription_grouped_with_prorated_minimum_price.rbs +4 -4
- data/sig/orb/models/new_subscription_matrix_price.rbs +4 -4
- data/sig/orb/models/new_subscription_matrix_with_allocation_price.rbs +4 -4
- data/sig/orb/models/new_subscription_matrix_with_display_name_price.rbs +4 -4
- data/sig/orb/models/new_subscription_max_group_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_subscription_minimum_composite_price.rbs +4 -4
- data/sig/orb/models/new_subscription_package_price.rbs +4 -4
- data/sig/orb/models/new_subscription_package_with_allocation_price.rbs +4 -4
- data/sig/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
- data/sig/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rbs +4 -4
- data/sig/orb/models/new_subscription_threshold_total_amount_price.rbs +4 -4
- data/sig/orb/models/new_subscription_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_subscription_tiered_package_with_minimum_price.rbs +4 -4
- data/sig/orb/models/new_subscription_tiered_price.rbs +4 -4
- data/sig/orb/models/new_subscription_tiered_with_minimum_price.rbs +4 -4
- data/sig/orb/models/new_subscription_unit_price.rbs +4 -4
- data/sig/orb/models/new_subscription_unit_with_percent_price.rbs +4 -4
- data/sig/orb/models/new_subscription_unit_with_proration_price.rbs +4 -4
- data/sig/orb/models/plan.rbs +134 -0
- data/sig/orb/models/plan_create_params.rbs +836 -5728
- data/sig/orb/models/plan_update_params.rbs +5 -0
- data/sig/orb/models/plan_version.rbs +134 -0
- data/sig/orb/models/plans/external_plan_id_update_params.rbs +5 -0
- data/sig/orb/models/price.rbs +2200 -1150
- data/sig/orb/models/price_create_params.rbs +611 -23
- data/sig/orb/models/price_evaluate_multiple_params.rbs +626 -23
- data/sig/orb/models/price_evaluate_preview_events_params.rbs +626 -23
- data/sig/orb/models/subscription.rbs +124 -0
- data/sig/orb/models/subscription_create_params.rbs +2009 -430
- data/sig/orb/models/subscription_price_intervals_params.rbs +795 -23
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +2009 -430
- data/sig/orb/models/subscription_update_params.rbs +5 -0
- data/sig/orb/models.rbs +2 -0
- data/sig/orb/resources/alerts.rbs +5 -1
- data/sig/orb/resources/customers.rbs +2 -0
- data/sig/orb/resources/licenses/external_licenses.rbs +1 -1
- data/sig/orb/resources/licenses/usage.rbs +2 -2
- data/sig/orb/resources/plans/external_plan_id.rbs +1 -0
- data/sig/orb/resources/plans.rbs +2 -0
- data/sig/orb/resources/subscriptions.rbs +3 -0
- metadata +6 -7
|
@@ -11,24 +11,57 @@ module Orb
|
|
|
11
11
|
sig { returns(String) }
|
|
12
12
|
attr_accessor :external_provider_id
|
|
13
13
|
|
|
14
|
-
sig { returns(
|
|
14
|
+
sig { returns(Orb::AccountingProviderConfig::ProviderType::OrSymbol) }
|
|
15
15
|
attr_accessor :provider_type
|
|
16
16
|
|
|
17
17
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
params(
|
|
19
|
+
external_provider_id: String,
|
|
20
|
+
provider_type: Orb::AccountingProviderConfig::ProviderType::OrSymbol
|
|
21
|
+
).returns(T.attached_class)
|
|
21
22
|
end
|
|
22
23
|
def self.new(external_provider_id:, provider_type:)
|
|
23
24
|
end
|
|
24
25
|
|
|
25
26
|
sig do
|
|
26
27
|
override.returns(
|
|
27
|
-
{
|
|
28
|
+
{
|
|
29
|
+
external_provider_id: String,
|
|
30
|
+
provider_type: Orb::AccountingProviderConfig::ProviderType::OrSymbol
|
|
31
|
+
}
|
|
28
32
|
)
|
|
29
33
|
end
|
|
30
34
|
def to_hash
|
|
31
35
|
end
|
|
36
|
+
|
|
37
|
+
module ProviderType
|
|
38
|
+
extend Orb::Internal::Type::Enum
|
|
39
|
+
|
|
40
|
+
TaggedSymbol =
|
|
41
|
+
T.type_alias do
|
|
42
|
+
T.all(Symbol, Orb::AccountingProviderConfig::ProviderType)
|
|
43
|
+
end
|
|
44
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
45
|
+
|
|
46
|
+
QUICKBOOKS =
|
|
47
|
+
T.let(
|
|
48
|
+
:quickbooks,
|
|
49
|
+
Orb::AccountingProviderConfig::ProviderType::TaggedSymbol
|
|
50
|
+
)
|
|
51
|
+
NETSUITE =
|
|
52
|
+
T.let(
|
|
53
|
+
:netsuite,
|
|
54
|
+
Orb::AccountingProviderConfig::ProviderType::TaggedSymbol
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
sig do
|
|
58
|
+
override.returns(
|
|
59
|
+
T::Array[Orb::AccountingProviderConfig::ProviderType::TaggedSymbol]
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
def self.values
|
|
63
|
+
end
|
|
64
|
+
end
|
|
32
65
|
end
|
|
33
66
|
end
|
|
34
67
|
end
|
|
@@ -32,6 +32,7 @@ module Orb
|
|
|
32
32
|
Orb::PlanPhaseUsageDiscountAdjustment::OrHash,
|
|
33
33
|
Orb::PlanPhaseAmountDiscountAdjustment::OrHash,
|
|
34
34
|
Orb::PlanPhasePercentageDiscountAdjustment::OrHash,
|
|
35
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::OrHash,
|
|
35
36
|
Orb::PlanPhaseMinimumAdjustment::OrHash,
|
|
36
37
|
Orb::PlanPhaseMaximumAdjustment::OrHash
|
|
37
38
|
),
|
|
@@ -75,11 +76,346 @@ module Orb
|
|
|
75
76
|
Orb::PlanPhaseUsageDiscountAdjustment,
|
|
76
77
|
Orb::PlanPhaseAmountDiscountAdjustment,
|
|
77
78
|
Orb::PlanPhasePercentageDiscountAdjustment,
|
|
79
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount,
|
|
78
80
|
Orb::PlanPhaseMinimumAdjustment,
|
|
79
81
|
Orb::PlanPhaseMaximumAdjustment
|
|
80
82
|
)
|
|
81
83
|
end
|
|
82
84
|
|
|
85
|
+
class TieredPercentageDiscount < Orb::Internal::Type::BaseModel
|
|
86
|
+
OrHash =
|
|
87
|
+
T.type_alias do
|
|
88
|
+
T.any(
|
|
89
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount,
|
|
90
|
+
Orb::Internal::AnyHash
|
|
91
|
+
)
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
sig { returns(String) }
|
|
95
|
+
attr_accessor :id
|
|
96
|
+
|
|
97
|
+
sig { returns(Symbol) }
|
|
98
|
+
attr_accessor :adjustment_type
|
|
99
|
+
|
|
100
|
+
# The price IDs that this adjustment applies to.
|
|
101
|
+
sig { returns(T::Array[String]) }
|
|
102
|
+
attr_accessor :applies_to_price_ids
|
|
103
|
+
|
|
104
|
+
# The filters that determine which prices to apply this adjustment to.
|
|
105
|
+
sig do
|
|
106
|
+
returns(
|
|
107
|
+
T::Array[
|
|
108
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter
|
|
109
|
+
]
|
|
110
|
+
)
|
|
111
|
+
end
|
|
112
|
+
attr_accessor :filters
|
|
113
|
+
|
|
114
|
+
# True for adjustments that apply to an entire invoice, false for adjustments that
|
|
115
|
+
# apply to only one price.
|
|
116
|
+
sig { returns(T::Boolean) }
|
|
117
|
+
attr_accessor :is_invoice_level
|
|
118
|
+
|
|
119
|
+
# The plan phase in which this adjustment is active.
|
|
120
|
+
sig { returns(T.nilable(Integer)) }
|
|
121
|
+
attr_accessor :plan_phase_order
|
|
122
|
+
|
|
123
|
+
# The reason for the adjustment.
|
|
124
|
+
sig { returns(T.nilable(String)) }
|
|
125
|
+
attr_accessor :reason
|
|
126
|
+
|
|
127
|
+
# The adjustment id this adjustment replaces. This adjustment will take the place
|
|
128
|
+
# of the replaced adjustment in plan version migrations.
|
|
129
|
+
sig { returns(T.nilable(String)) }
|
|
130
|
+
attr_accessor :replaces_adjustment_id
|
|
131
|
+
|
|
132
|
+
# The ordered, contiguous bands of cumulative eligible spend, each discounted at
|
|
133
|
+
# its own percentage (progressive fill-a-tier), applied to the prices this
|
|
134
|
+
# adjustment covers in a given billing period.
|
|
135
|
+
sig do
|
|
136
|
+
returns(
|
|
137
|
+
T::Array[
|
|
138
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Tier
|
|
139
|
+
]
|
|
140
|
+
)
|
|
141
|
+
end
|
|
142
|
+
attr_accessor :tiers
|
|
143
|
+
|
|
144
|
+
sig do
|
|
145
|
+
params(
|
|
146
|
+
id: String,
|
|
147
|
+
applies_to_price_ids: T::Array[String],
|
|
148
|
+
filters:
|
|
149
|
+
T::Array[
|
|
150
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::OrHash
|
|
151
|
+
],
|
|
152
|
+
is_invoice_level: T::Boolean,
|
|
153
|
+
plan_phase_order: T.nilable(Integer),
|
|
154
|
+
reason: T.nilable(String),
|
|
155
|
+
replaces_adjustment_id: T.nilable(String),
|
|
156
|
+
tiers:
|
|
157
|
+
T::Array[
|
|
158
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Tier::OrHash
|
|
159
|
+
],
|
|
160
|
+
adjustment_type: Symbol
|
|
161
|
+
).returns(T.attached_class)
|
|
162
|
+
end
|
|
163
|
+
def self.new(
|
|
164
|
+
id:,
|
|
165
|
+
# The price IDs that this adjustment applies to.
|
|
166
|
+
applies_to_price_ids:,
|
|
167
|
+
# The filters that determine which prices to apply this adjustment to.
|
|
168
|
+
filters:,
|
|
169
|
+
# True for adjustments that apply to an entire invoice, false for adjustments that
|
|
170
|
+
# apply to only one price.
|
|
171
|
+
is_invoice_level:,
|
|
172
|
+
# The plan phase in which this adjustment is active.
|
|
173
|
+
plan_phase_order:,
|
|
174
|
+
# The reason for the adjustment.
|
|
175
|
+
reason:,
|
|
176
|
+
# The adjustment id this adjustment replaces. This adjustment will take the place
|
|
177
|
+
# of the replaced adjustment in plan version migrations.
|
|
178
|
+
replaces_adjustment_id:,
|
|
179
|
+
# The ordered, contiguous bands of cumulative eligible spend, each discounted at
|
|
180
|
+
# its own percentage (progressive fill-a-tier), applied to the prices this
|
|
181
|
+
# adjustment covers in a given billing period.
|
|
182
|
+
tiers:,
|
|
183
|
+
adjustment_type: :tiered_percentage_discount
|
|
184
|
+
)
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
sig do
|
|
188
|
+
override.returns(
|
|
189
|
+
{
|
|
190
|
+
id: String,
|
|
191
|
+
adjustment_type: Symbol,
|
|
192
|
+
applies_to_price_ids: T::Array[String],
|
|
193
|
+
filters:
|
|
194
|
+
T::Array[
|
|
195
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter
|
|
196
|
+
],
|
|
197
|
+
is_invoice_level: T::Boolean,
|
|
198
|
+
plan_phase_order: T.nilable(Integer),
|
|
199
|
+
reason: T.nilable(String),
|
|
200
|
+
replaces_adjustment_id: T.nilable(String),
|
|
201
|
+
tiers:
|
|
202
|
+
T::Array[
|
|
203
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Tier
|
|
204
|
+
]
|
|
205
|
+
}
|
|
206
|
+
)
|
|
207
|
+
end
|
|
208
|
+
def to_hash
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
class Filter < Orb::Internal::Type::BaseModel
|
|
212
|
+
OrHash =
|
|
213
|
+
T.type_alias do
|
|
214
|
+
T.any(
|
|
215
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter,
|
|
216
|
+
Orb::Internal::AnyHash
|
|
217
|
+
)
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# The property of the price to filter on.
|
|
221
|
+
sig do
|
|
222
|
+
returns(
|
|
223
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol
|
|
224
|
+
)
|
|
225
|
+
end
|
|
226
|
+
attr_accessor :field
|
|
227
|
+
|
|
228
|
+
# Should prices that match the filter be included or excluded.
|
|
229
|
+
sig do
|
|
230
|
+
returns(
|
|
231
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Operator::TaggedSymbol
|
|
232
|
+
)
|
|
233
|
+
end
|
|
234
|
+
attr_accessor :operator
|
|
235
|
+
|
|
236
|
+
# The IDs or values that match this filter.
|
|
237
|
+
sig { returns(T::Array[String]) }
|
|
238
|
+
attr_accessor :values
|
|
239
|
+
|
|
240
|
+
sig do
|
|
241
|
+
params(
|
|
242
|
+
field:
|
|
243
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Field::OrSymbol,
|
|
244
|
+
operator:
|
|
245
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Operator::OrSymbol,
|
|
246
|
+
values: T::Array[String]
|
|
247
|
+
).returns(T.attached_class)
|
|
248
|
+
end
|
|
249
|
+
def self.new(
|
|
250
|
+
# The property of the price to filter on.
|
|
251
|
+
field:,
|
|
252
|
+
# Should prices that match the filter be included or excluded.
|
|
253
|
+
operator:,
|
|
254
|
+
# The IDs or values that match this filter.
|
|
255
|
+
values:
|
|
256
|
+
)
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
sig do
|
|
260
|
+
override.returns(
|
|
261
|
+
{
|
|
262
|
+
field:
|
|
263
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol,
|
|
264
|
+
operator:
|
|
265
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Operator::TaggedSymbol,
|
|
266
|
+
values: T::Array[String]
|
|
267
|
+
}
|
|
268
|
+
)
|
|
269
|
+
end
|
|
270
|
+
def to_hash
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# The property of the price to filter on.
|
|
274
|
+
module Field
|
|
275
|
+
extend Orb::Internal::Type::Enum
|
|
276
|
+
|
|
277
|
+
TaggedSymbol =
|
|
278
|
+
T.type_alias do
|
|
279
|
+
T.all(
|
|
280
|
+
Symbol,
|
|
281
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Field
|
|
282
|
+
)
|
|
283
|
+
end
|
|
284
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
285
|
+
|
|
286
|
+
PRICE_ID =
|
|
287
|
+
T.let(
|
|
288
|
+
:price_id,
|
|
289
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol
|
|
290
|
+
)
|
|
291
|
+
ITEM_ID =
|
|
292
|
+
T.let(
|
|
293
|
+
:item_id,
|
|
294
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol
|
|
295
|
+
)
|
|
296
|
+
PRICE_TYPE =
|
|
297
|
+
T.let(
|
|
298
|
+
:price_type,
|
|
299
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol
|
|
300
|
+
)
|
|
301
|
+
CURRENCY =
|
|
302
|
+
T.let(
|
|
303
|
+
:currency,
|
|
304
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol
|
|
305
|
+
)
|
|
306
|
+
PRICING_UNIT_ID =
|
|
307
|
+
T.let(
|
|
308
|
+
:pricing_unit_id,
|
|
309
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
sig do
|
|
313
|
+
override.returns(
|
|
314
|
+
T::Array[
|
|
315
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol
|
|
316
|
+
]
|
|
317
|
+
)
|
|
318
|
+
end
|
|
319
|
+
def self.values
|
|
320
|
+
end
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Should prices that match the filter be included or excluded.
|
|
324
|
+
module Operator
|
|
325
|
+
extend Orb::Internal::Type::Enum
|
|
326
|
+
|
|
327
|
+
TaggedSymbol =
|
|
328
|
+
T.type_alias do
|
|
329
|
+
T.all(
|
|
330
|
+
Symbol,
|
|
331
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Operator
|
|
332
|
+
)
|
|
333
|
+
end
|
|
334
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
335
|
+
|
|
336
|
+
INCLUDES =
|
|
337
|
+
T.let(
|
|
338
|
+
:includes,
|
|
339
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Operator::TaggedSymbol
|
|
340
|
+
)
|
|
341
|
+
EXCLUDES =
|
|
342
|
+
T.let(
|
|
343
|
+
:excludes,
|
|
344
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Operator::TaggedSymbol
|
|
345
|
+
)
|
|
346
|
+
|
|
347
|
+
sig do
|
|
348
|
+
override.returns(
|
|
349
|
+
T::Array[
|
|
350
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Operator::TaggedSymbol
|
|
351
|
+
]
|
|
352
|
+
)
|
|
353
|
+
end
|
|
354
|
+
def self.values
|
|
355
|
+
end
|
|
356
|
+
end
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
class Tier < Orb::Internal::Type::BaseModel
|
|
360
|
+
OrHash =
|
|
361
|
+
T.type_alias do
|
|
362
|
+
T.any(
|
|
363
|
+
Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Tier,
|
|
364
|
+
Orb::Internal::AnyHash
|
|
365
|
+
)
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
# Exclusive lower bound of cumulative spend for this tier.
|
|
369
|
+
sig { returns(Float) }
|
|
370
|
+
attr_accessor :lower_bound
|
|
371
|
+
|
|
372
|
+
# The percentage (between 0 and 1) discounted from spend that falls within this
|
|
373
|
+
# tier.
|
|
374
|
+
sig { returns(Float) }
|
|
375
|
+
attr_accessor :percentage
|
|
376
|
+
|
|
377
|
+
# Inclusive upper bound of cumulative spend for this tier; null for the final
|
|
378
|
+
# open-ended tier.
|
|
379
|
+
sig { returns(T.nilable(Float)) }
|
|
380
|
+
attr_accessor :upper_bound
|
|
381
|
+
|
|
382
|
+
# One band of a tiered percentage discount. Bounds are denominated in the
|
|
383
|
+
# discount's currency. `lower_bound` is the exclusive start of the band and
|
|
384
|
+
# `upper_bound` is the inclusive end; `upper_bound` is null only for the
|
|
385
|
+
# open-ended final tier.
|
|
386
|
+
sig do
|
|
387
|
+
params(
|
|
388
|
+
lower_bound: Float,
|
|
389
|
+
percentage: Float,
|
|
390
|
+
upper_bound: T.nilable(Float)
|
|
391
|
+
).returns(T.attached_class)
|
|
392
|
+
end
|
|
393
|
+
def self.new(
|
|
394
|
+
# Exclusive lower bound of cumulative spend for this tier.
|
|
395
|
+
lower_bound:,
|
|
396
|
+
# The percentage (between 0 and 1) discounted from spend that falls within this
|
|
397
|
+
# tier.
|
|
398
|
+
percentage:,
|
|
399
|
+
# Inclusive upper bound of cumulative spend for this tier; null for the final
|
|
400
|
+
# open-ended tier.
|
|
401
|
+
upper_bound: nil
|
|
402
|
+
)
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
sig do
|
|
406
|
+
override.returns(
|
|
407
|
+
{
|
|
408
|
+
lower_bound: Float,
|
|
409
|
+
percentage: Float,
|
|
410
|
+
upper_bound: T.nilable(Float)
|
|
411
|
+
}
|
|
412
|
+
)
|
|
413
|
+
end
|
|
414
|
+
def to_hash
|
|
415
|
+
end
|
|
416
|
+
end
|
|
417
|
+
end
|
|
418
|
+
|
|
83
419
|
sig do
|
|
84
420
|
override.returns(
|
|
85
421
|
T::Array[Orb::AdjustmentInterval::Adjustment::Variants]
|
data/rbi/orb/models/alert.rbi
CHANGED
|
@@ -79,6 +79,16 @@ module Orb
|
|
|
79
79
|
end
|
|
80
80
|
attr_writer :license_type
|
|
81
81
|
|
|
82
|
+
# Filters scoping which prices are included in grouped cost alert evaluation.
|
|
83
|
+
sig { returns(T.nilable(T::Array[Orb::Alert::PriceFilter])) }
|
|
84
|
+
attr_accessor :price_filters
|
|
85
|
+
|
|
86
|
+
# Per-group threshold overrides. Each override maps a specific combination of
|
|
87
|
+
# grouping_keys values to a replacement threshold list. Only present for grouped
|
|
88
|
+
# cost alerts that have at least one override.
|
|
89
|
+
sig { returns(T.nilable(T::Array[Orb::Alert::ThresholdOverride])) }
|
|
90
|
+
attr_accessor :threshold_overrides
|
|
91
|
+
|
|
82
92
|
# [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending,
|
|
83
93
|
# usage, or credit balance and trigger webhooks when a threshold is exceeded.
|
|
84
94
|
#
|
|
@@ -99,7 +109,10 @@ module Orb
|
|
|
99
109
|
balance_alert_status:
|
|
100
110
|
T.nilable(T::Array[Orb::Alert::BalanceAlertStatus::OrHash]),
|
|
101
111
|
grouping_keys: T.nilable(T::Array[String]),
|
|
102
|
-
license_type: T.nilable(Orb::Alert::LicenseType::OrHash)
|
|
112
|
+
license_type: T.nilable(Orb::Alert::LicenseType::OrHash),
|
|
113
|
+
price_filters: T.nilable(T::Array[Orb::Alert::PriceFilter::OrHash]),
|
|
114
|
+
threshold_overrides:
|
|
115
|
+
T.nilable(T::Array[Orb::Alert::ThresholdOverride::OrHash])
|
|
103
116
|
).returns(T.attached_class)
|
|
104
117
|
end
|
|
105
118
|
def self.new(
|
|
@@ -131,7 +144,13 @@ module Orb
|
|
|
131
144
|
# grouping enabled.
|
|
132
145
|
grouping_keys: nil,
|
|
133
146
|
# Minified license type for alert serialization.
|
|
134
|
-
license_type: nil
|
|
147
|
+
license_type: nil,
|
|
148
|
+
# Filters scoping which prices are included in grouped cost alert evaluation.
|
|
149
|
+
price_filters: nil,
|
|
150
|
+
# Per-group threshold overrides. Each override maps a specific combination of
|
|
151
|
+
# grouping_keys values to a replacement threshold list. Only present for grouped
|
|
152
|
+
# cost alerts that have at least one override.
|
|
153
|
+
threshold_overrides: nil
|
|
135
154
|
)
|
|
136
155
|
end
|
|
137
156
|
|
|
@@ -151,7 +170,10 @@ module Orb
|
|
|
151
170
|
balance_alert_status:
|
|
152
171
|
T.nilable(T::Array[Orb::Alert::BalanceAlertStatus]),
|
|
153
172
|
grouping_keys: T.nilable(T::Array[String]),
|
|
154
|
-
license_type: T.nilable(Orb::Alert::LicenseType)
|
|
173
|
+
license_type: T.nilable(Orb::Alert::LicenseType),
|
|
174
|
+
price_filters: T.nilable(T::Array[Orb::Alert::PriceFilter]),
|
|
175
|
+
threshold_overrides:
|
|
176
|
+
T.nilable(T::Array[Orb::Alert::ThresholdOverride])
|
|
155
177
|
}
|
|
156
178
|
)
|
|
157
179
|
end
|
|
@@ -307,6 +329,153 @@ module Orb
|
|
|
307
329
|
def to_hash
|
|
308
330
|
end
|
|
309
331
|
end
|
|
332
|
+
|
|
333
|
+
class PriceFilter < Orb::Internal::Type::BaseModel
|
|
334
|
+
OrHash =
|
|
335
|
+
T.type_alias do
|
|
336
|
+
T.any(Orb::Alert::PriceFilter, Orb::Internal::AnyHash)
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
# The property of the price to filter on.
|
|
340
|
+
sig { returns(Orb::Alert::PriceFilter::Field::TaggedSymbol) }
|
|
341
|
+
attr_accessor :field
|
|
342
|
+
|
|
343
|
+
# Should prices that match the filter be included or excluded.
|
|
344
|
+
sig { returns(Orb::Alert::PriceFilter::Operator::TaggedSymbol) }
|
|
345
|
+
attr_accessor :operator
|
|
346
|
+
|
|
347
|
+
# The IDs or values that match this filter.
|
|
348
|
+
sig { returns(T::Array[String]) }
|
|
349
|
+
attr_accessor :values
|
|
350
|
+
|
|
351
|
+
sig do
|
|
352
|
+
params(
|
|
353
|
+
field: Orb::Alert::PriceFilter::Field::OrSymbol,
|
|
354
|
+
operator: Orb::Alert::PriceFilter::Operator::OrSymbol,
|
|
355
|
+
values: T::Array[String]
|
|
356
|
+
).returns(T.attached_class)
|
|
357
|
+
end
|
|
358
|
+
def self.new(
|
|
359
|
+
# The property of the price to filter on.
|
|
360
|
+
field:,
|
|
361
|
+
# Should prices that match the filter be included or excluded.
|
|
362
|
+
operator:,
|
|
363
|
+
# The IDs or values that match this filter.
|
|
364
|
+
values:
|
|
365
|
+
)
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
sig do
|
|
369
|
+
override.returns(
|
|
370
|
+
{
|
|
371
|
+
field: Orb::Alert::PriceFilter::Field::TaggedSymbol,
|
|
372
|
+
operator: Orb::Alert::PriceFilter::Operator::TaggedSymbol,
|
|
373
|
+
values: T::Array[String]
|
|
374
|
+
}
|
|
375
|
+
)
|
|
376
|
+
end
|
|
377
|
+
def to_hash
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
# The property of the price to filter on.
|
|
381
|
+
module Field
|
|
382
|
+
extend Orb::Internal::Type::Enum
|
|
383
|
+
|
|
384
|
+
TaggedSymbol =
|
|
385
|
+
T.type_alias { T.all(Symbol, Orb::Alert::PriceFilter::Field) }
|
|
386
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
387
|
+
|
|
388
|
+
PRICE_ID =
|
|
389
|
+
T.let(:price_id, Orb::Alert::PriceFilter::Field::TaggedSymbol)
|
|
390
|
+
ITEM_ID =
|
|
391
|
+
T.let(:item_id, Orb::Alert::PriceFilter::Field::TaggedSymbol)
|
|
392
|
+
PRICE_TYPE =
|
|
393
|
+
T.let(:price_type, Orb::Alert::PriceFilter::Field::TaggedSymbol)
|
|
394
|
+
CURRENCY =
|
|
395
|
+
T.let(:currency, Orb::Alert::PriceFilter::Field::TaggedSymbol)
|
|
396
|
+
PRICING_UNIT_ID =
|
|
397
|
+
T.let(
|
|
398
|
+
:pricing_unit_id,
|
|
399
|
+
Orb::Alert::PriceFilter::Field::TaggedSymbol
|
|
400
|
+
)
|
|
401
|
+
|
|
402
|
+
sig do
|
|
403
|
+
override.returns(
|
|
404
|
+
T::Array[Orb::Alert::PriceFilter::Field::TaggedSymbol]
|
|
405
|
+
)
|
|
406
|
+
end
|
|
407
|
+
def self.values
|
|
408
|
+
end
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
# Should prices that match the filter be included or excluded.
|
|
412
|
+
module Operator
|
|
413
|
+
extend Orb::Internal::Type::Enum
|
|
414
|
+
|
|
415
|
+
TaggedSymbol =
|
|
416
|
+
T.type_alias { T.all(Symbol, Orb::Alert::PriceFilter::Operator) }
|
|
417
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
418
|
+
|
|
419
|
+
INCLUDES =
|
|
420
|
+
T.let(:includes, Orb::Alert::PriceFilter::Operator::TaggedSymbol)
|
|
421
|
+
EXCLUDES =
|
|
422
|
+
T.let(:excludes, Orb::Alert::PriceFilter::Operator::TaggedSymbol)
|
|
423
|
+
|
|
424
|
+
sig do
|
|
425
|
+
override.returns(
|
|
426
|
+
T::Array[Orb::Alert::PriceFilter::Operator::TaggedSymbol]
|
|
427
|
+
)
|
|
428
|
+
end
|
|
429
|
+
def self.values
|
|
430
|
+
end
|
|
431
|
+
end
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
class ThresholdOverride < Orb::Internal::Type::BaseModel
|
|
435
|
+
OrHash =
|
|
436
|
+
T.type_alias do
|
|
437
|
+
T.any(Orb::Alert::ThresholdOverride, Orb::Internal::AnyHash)
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
# The values of the grouping keys that identify this group. The list length
|
|
441
|
+
# matches the alert's grouping_keys.
|
|
442
|
+
sig { returns(T::Array[String]) }
|
|
443
|
+
attr_accessor :group_values
|
|
444
|
+
|
|
445
|
+
# The thresholds applied to this group. An empty list means the group is silenced.
|
|
446
|
+
sig { returns(T::Array[Orb::Threshold]) }
|
|
447
|
+
attr_accessor :thresholds
|
|
448
|
+
|
|
449
|
+
# A per-group threshold override on a grouped cost alert.
|
|
450
|
+
#
|
|
451
|
+
# An empty `thresholds` list means the group is silenced (never fires). A
|
|
452
|
+
# non-empty list fully replaces the default thresholds for that group.
|
|
453
|
+
sig do
|
|
454
|
+
params(
|
|
455
|
+
group_values: T::Array[String],
|
|
456
|
+
thresholds: T::Array[Orb::Threshold::OrHash]
|
|
457
|
+
).returns(T.attached_class)
|
|
458
|
+
end
|
|
459
|
+
def self.new(
|
|
460
|
+
# The values of the grouping keys that identify this group. The list length
|
|
461
|
+
# matches the alert's grouping_keys.
|
|
462
|
+
group_values:,
|
|
463
|
+
# The thresholds applied to this group. An empty list means the group is silenced.
|
|
464
|
+
thresholds:
|
|
465
|
+
)
|
|
466
|
+
end
|
|
467
|
+
|
|
468
|
+
sig do
|
|
469
|
+
override.returns(
|
|
470
|
+
{
|
|
471
|
+
group_values: T::Array[String],
|
|
472
|
+
thresholds: T::Array[Orb::Threshold]
|
|
473
|
+
}
|
|
474
|
+
)
|
|
475
|
+
end
|
|
476
|
+
def to_hash
|
|
477
|
+
end
|
|
478
|
+
end
|
|
310
479
|
end
|
|
311
480
|
end
|
|
312
481
|
end
|