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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1d305b878bb757ab7c0461ba4d35bd2560e829eae8bb2676103b62b27773d82f
|
|
4
|
+
data.tar.gz: d5253fbeb8bdec63084816df8c75aa129a131a3f041cccef9fa4c20b87aac356
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cef11be3d2248ba0e2acd7567cbf84ea311cbb155037959b97c936a5209278fd8eb77182fc10705cbc46dd34f3742bb0c7575bf946388a5787f9af720a945b54
|
|
7
|
+
data.tar.gz: 6385a21d5e76d000caebb5cfffde20e82a03b1629237969091403563b615fd76d22af28dd8c59210021d62a73aaa51a42342bd9e2464902e2092440e0c9e261a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.15.0](https://github.com/orbcorp/orb-ruby/compare/v1.14.0...v1.15.0) (2026-07-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **api:** update SDK to the current API surface ([76b0a4c](https://github.com/orbcorp/orb-ruby/commit/76b0a4cae87319dc6bed426faf248048a1b12209))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Chores
|
|
12
|
+
|
|
13
|
+
* **internal:** remove unsupported release-please extra-file ([adb7182](https://github.com/orbcorp/orb-ruby/commit/adb7182e0c2d661afa1de1df07dca11286a133a2))
|
|
14
|
+
|
|
3
15
|
## 1.14.0 (2026-04-13)
|
|
4
16
|
|
|
5
17
|
Full Changelog: [v1.13.0...v1.14.0](https://github.com/orbcorp/orb-ruby/compare/v1.13.0...v1.14.0)
|
data/lib/orb/client.rb
CHANGED
|
@@ -193,6 +193,19 @@ module Orb
|
|
|
193
193
|
raise ArgumentError.new("api_key is required, and can be set via environ: \"ORB_API_KEY\"")
|
|
194
194
|
end
|
|
195
195
|
|
|
196
|
+
headers = {}
|
|
197
|
+
custom_headers_env = ENV["ORB_CUSTOM_HEADERS"]
|
|
198
|
+
unless custom_headers_env.nil?
|
|
199
|
+
parsed = {}
|
|
200
|
+
custom_headers_env.split("\n").each do |line|
|
|
201
|
+
colon = line.index(":")
|
|
202
|
+
unless colon.nil?
|
|
203
|
+
parsed[line[0...colon].strip] = line[(colon + 1)..].strip
|
|
204
|
+
end
|
|
205
|
+
end
|
|
206
|
+
headers = parsed.merge(headers)
|
|
207
|
+
end
|
|
208
|
+
|
|
196
209
|
@api_key = api_key.to_s
|
|
197
210
|
@webhook_secret = webhook_secret&.to_s
|
|
198
211
|
|
|
@@ -202,6 +215,7 @@ module Orb
|
|
|
202
215
|
max_retries: max_retries,
|
|
203
216
|
initial_retry_delay: initial_retry_delay,
|
|
204
217
|
max_retry_delay: max_retry_delay,
|
|
218
|
+
headers: headers,
|
|
205
219
|
idempotency_header: idempotency_header
|
|
206
220
|
)
|
|
207
221
|
|
|
@@ -306,6 +306,11 @@ module Orb
|
|
|
306
306
|
Orb::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
|
|
307
307
|
end
|
|
308
308
|
|
|
309
|
+
# Generated methods always pass `req[:body]` for operations that define a
|
|
310
|
+
# request body, so only elide the content-type header when the operation
|
|
311
|
+
# has no body at all, not when an optional body param was omitted.
|
|
312
|
+
headers.delete("content-type") if body.nil? && !req.key?(:body)
|
|
313
|
+
|
|
309
314
|
url = Orb::Internal::Util.join_parsed_uri(@base_url_components, {**req, path: path, query: query})
|
|
310
315
|
headers, encoded = Orb::Internal::Util.encode_content(headers, body)
|
|
311
316
|
{
|
|
@@ -6,38 +6,24 @@ module Orb
|
|
|
6
6
|
# @api private
|
|
7
7
|
#
|
|
8
8
|
# @example
|
|
9
|
-
# # `
|
|
10
|
-
# case
|
|
11
|
-
# when Orb::
|
|
12
|
-
# puts(
|
|
13
|
-
# when Orb::
|
|
14
|
-
# puts(
|
|
15
|
-
# when Orb::UsageDiscount
|
|
16
|
-
# puts(discount.usage_discount)
|
|
9
|
+
# # `conversion_rate_config` is a `Orb::ConversionRateConfig`
|
|
10
|
+
# case conversion_rate_config
|
|
11
|
+
# when Orb::UnitConversionRateConfig
|
|
12
|
+
# puts(conversion_rate_config.conversion_rate_type)
|
|
13
|
+
# when Orb::TieredConversionRateConfig
|
|
14
|
+
# puts(conversion_rate_config.tiered_config)
|
|
17
15
|
# else
|
|
18
|
-
# puts(
|
|
16
|
+
# puts(conversion_rate_config)
|
|
19
17
|
# end
|
|
20
18
|
#
|
|
21
19
|
# @example
|
|
22
|
-
# case
|
|
23
|
-
# in {
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
# filters: filters
|
|
28
|
-
# }
|
|
29
|
-
# puts(percentage_discount)
|
|
30
|
-
# in {discount_type: :trial, applies_to_price_ids: applies_to_price_ids, filters: filters, reason: reason}
|
|
31
|
-
# puts(applies_to_price_ids)
|
|
32
|
-
# in {
|
|
33
|
-
# discount_type: :usage,
|
|
34
|
-
# usage_discount: usage_discount,
|
|
35
|
-
# applies_to_price_ids: applies_to_price_ids,
|
|
36
|
-
# filters: filters
|
|
37
|
-
# }
|
|
38
|
-
# puts(usage_discount)
|
|
20
|
+
# case conversion_rate_config
|
|
21
|
+
# in {conversion_rate_type: :unit, unit_config: unit_config}
|
|
22
|
+
# puts(unit_config)
|
|
23
|
+
# in {conversion_rate_type: :tiered, tiered_config: tiered_config}
|
|
24
|
+
# puts(tiered_config)
|
|
39
25
|
# else
|
|
40
|
-
# puts(
|
|
26
|
+
# puts(conversion_rate_config)
|
|
41
27
|
# end
|
|
42
28
|
module Union
|
|
43
29
|
include Orb::Internal::Type::Converter
|
|
@@ -10,12 +10,23 @@ module Orb
|
|
|
10
10
|
|
|
11
11
|
# @!attribute provider_type
|
|
12
12
|
#
|
|
13
|
-
# @return [
|
|
14
|
-
required :provider_type,
|
|
13
|
+
# @return [Symbol, Orb::Models::AccountingProviderConfig::ProviderType]
|
|
14
|
+
required :provider_type, enum: -> { Orb::AccountingProviderConfig::ProviderType }
|
|
15
15
|
|
|
16
16
|
# @!method initialize(external_provider_id:, provider_type:)
|
|
17
17
|
# @param external_provider_id [String]
|
|
18
|
-
# @param provider_type [
|
|
18
|
+
# @param provider_type [Symbol, Orb::Models::AccountingProviderConfig::ProviderType]
|
|
19
|
+
|
|
20
|
+
# @see Orb::Models::AccountingProviderConfig#provider_type
|
|
21
|
+
module ProviderType
|
|
22
|
+
extend Orb::Internal::Type::Enum
|
|
23
|
+
|
|
24
|
+
QUICKBOOKS = :quickbooks
|
|
25
|
+
NETSUITE = :netsuite
|
|
26
|
+
|
|
27
|
+
# @!method self.values
|
|
28
|
+
# @return [Array<Symbol>]
|
|
29
|
+
end
|
|
19
30
|
end
|
|
20
31
|
end
|
|
21
32
|
end
|
|
@@ -10,7 +10,7 @@ module Orb
|
|
|
10
10
|
|
|
11
11
|
# @!attribute adjustment
|
|
12
12
|
#
|
|
13
|
-
# @return [Orb::Models::PlanPhaseUsageDiscountAdjustment, Orb::Models::PlanPhaseAmountDiscountAdjustment, Orb::Models::PlanPhasePercentageDiscountAdjustment, Orb::Models::PlanPhaseMinimumAdjustment, Orb::Models::PlanPhaseMaximumAdjustment]
|
|
13
|
+
# @return [Orb::Models::PlanPhaseUsageDiscountAdjustment, Orb::Models::PlanPhaseAmountDiscountAdjustment, Orb::Models::PlanPhasePercentageDiscountAdjustment, Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount, Orb::Models::PlanPhaseMinimumAdjustment, Orb::Models::PlanPhaseMaximumAdjustment]
|
|
14
14
|
required :adjustment, union: -> { Orb::AdjustmentInterval::Adjustment }
|
|
15
15
|
|
|
16
16
|
# @!attribute applies_to_price_interval_ids
|
|
@@ -34,7 +34,7 @@ module Orb
|
|
|
34
34
|
# @!method initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:)
|
|
35
35
|
# @param id [String]
|
|
36
36
|
#
|
|
37
|
-
# @param adjustment [Orb::Models::PlanPhaseUsageDiscountAdjustment, Orb::Models::PlanPhaseAmountDiscountAdjustment, Orb::Models::PlanPhasePercentageDiscountAdjustment, Orb::Models::PlanPhaseMinimumAdjustment, Orb::Models::PlanPhaseMaximumAdjustment]
|
|
37
|
+
# @param adjustment [Orb::Models::PlanPhaseUsageDiscountAdjustment, Orb::Models::PlanPhaseAmountDiscountAdjustment, Orb::Models::PlanPhasePercentageDiscountAdjustment, Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount, Orb::Models::PlanPhaseMinimumAdjustment, Orb::Models::PlanPhaseMaximumAdjustment]
|
|
38
38
|
#
|
|
39
39
|
# @param applies_to_price_interval_ids [Array<String>] The price interval IDs that this adjustment applies to.
|
|
40
40
|
#
|
|
@@ -54,12 +54,194 @@ module Orb
|
|
|
54
54
|
|
|
55
55
|
variant :percentage_discount, -> { Orb::PlanPhasePercentageDiscountAdjustment }
|
|
56
56
|
|
|
57
|
+
variant :tiered_percentage_discount, -> { Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount }
|
|
58
|
+
|
|
57
59
|
variant :minimum, -> { Orb::PlanPhaseMinimumAdjustment }
|
|
58
60
|
|
|
59
61
|
variant :maximum, -> { Orb::PlanPhaseMaximumAdjustment }
|
|
60
62
|
|
|
63
|
+
class TieredPercentageDiscount < Orb::Internal::Type::BaseModel
|
|
64
|
+
# @!attribute id
|
|
65
|
+
#
|
|
66
|
+
# @return [String]
|
|
67
|
+
required :id, String
|
|
68
|
+
|
|
69
|
+
# @!attribute adjustment_type
|
|
70
|
+
#
|
|
71
|
+
# @return [Symbol, :tiered_percentage_discount]
|
|
72
|
+
required :adjustment_type, const: :tiered_percentage_discount
|
|
73
|
+
|
|
74
|
+
# @!attribute applies_to_price_ids
|
|
75
|
+
# @deprecated
|
|
76
|
+
#
|
|
77
|
+
# The price IDs that this adjustment applies to.
|
|
78
|
+
#
|
|
79
|
+
# @return [Array<String>]
|
|
80
|
+
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
|
81
|
+
|
|
82
|
+
# @!attribute filters
|
|
83
|
+
# The filters that determine which prices to apply this adjustment to.
|
|
84
|
+
#
|
|
85
|
+
# @return [Array<Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter>]
|
|
86
|
+
required :filters,
|
|
87
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter] }
|
|
88
|
+
|
|
89
|
+
# @!attribute is_invoice_level
|
|
90
|
+
# True for adjustments that apply to an entire invoice, false for adjustments that
|
|
91
|
+
# apply to only one price.
|
|
92
|
+
#
|
|
93
|
+
# @return [Boolean]
|
|
94
|
+
required :is_invoice_level, Orb::Internal::Type::Boolean
|
|
95
|
+
|
|
96
|
+
# @!attribute plan_phase_order
|
|
97
|
+
# The plan phase in which this adjustment is active.
|
|
98
|
+
#
|
|
99
|
+
# @return [Integer, nil]
|
|
100
|
+
required :plan_phase_order, Integer, nil?: true
|
|
101
|
+
|
|
102
|
+
# @!attribute reason
|
|
103
|
+
# The reason for the adjustment.
|
|
104
|
+
#
|
|
105
|
+
# @return [String, nil]
|
|
106
|
+
required :reason, String, nil?: true
|
|
107
|
+
|
|
108
|
+
# @!attribute replaces_adjustment_id
|
|
109
|
+
# The adjustment id this adjustment replaces. This adjustment will take the place
|
|
110
|
+
# of the replaced adjustment in plan version migrations.
|
|
111
|
+
#
|
|
112
|
+
# @return [String, nil]
|
|
113
|
+
required :replaces_adjustment_id, String, nil?: true
|
|
114
|
+
|
|
115
|
+
# @!attribute tiers
|
|
116
|
+
# The ordered, contiguous bands of cumulative eligible spend, each discounted at
|
|
117
|
+
# its own percentage (progressive fill-a-tier), applied to the prices this
|
|
118
|
+
# adjustment covers in a given billing period.
|
|
119
|
+
#
|
|
120
|
+
# @return [Array<Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Tier>]
|
|
121
|
+
required :tiers,
|
|
122
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Tier] }
|
|
123
|
+
|
|
124
|
+
# @!method initialize(id:, applies_to_price_ids:, filters:, is_invoice_level:, plan_phase_order:, reason:, replaces_adjustment_id:, tiers:, adjustment_type: :tiered_percentage_discount)
|
|
125
|
+
# Some parameter documentations has been truncated, see
|
|
126
|
+
# {Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount} for more
|
|
127
|
+
# details.
|
|
128
|
+
#
|
|
129
|
+
# @param id [String]
|
|
130
|
+
#
|
|
131
|
+
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
|
132
|
+
#
|
|
133
|
+
# @param filters [Array<Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
|
|
134
|
+
#
|
|
135
|
+
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invoice, false for adjustments that
|
|
136
|
+
#
|
|
137
|
+
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
|
138
|
+
#
|
|
139
|
+
# @param reason [String, nil] The reason for the adjustment.
|
|
140
|
+
#
|
|
141
|
+
# @param replaces_adjustment_id [String, nil] The adjustment id this adjustment replaces. This adjustment will take the place
|
|
142
|
+
#
|
|
143
|
+
# @param tiers [Array<Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Tier>] The ordered, contiguous bands of cumulative eligible spend, each discounted at i
|
|
144
|
+
#
|
|
145
|
+
# @param adjustment_type [Symbol, :tiered_percentage_discount]
|
|
146
|
+
|
|
147
|
+
class Filter < Orb::Internal::Type::BaseModel
|
|
148
|
+
# @!attribute field
|
|
149
|
+
# The property of the price to filter on.
|
|
150
|
+
#
|
|
151
|
+
# @return [Symbol, Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Field]
|
|
152
|
+
required :field, enum: -> { Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Field }
|
|
153
|
+
|
|
154
|
+
# @!attribute operator
|
|
155
|
+
# Should prices that match the filter be included or excluded.
|
|
156
|
+
#
|
|
157
|
+
# @return [Symbol, Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Operator]
|
|
158
|
+
required :operator,
|
|
159
|
+
enum: -> { Orb::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Operator }
|
|
160
|
+
|
|
161
|
+
# @!attribute values
|
|
162
|
+
# The IDs or values that match this filter.
|
|
163
|
+
#
|
|
164
|
+
# @return [Array<String>]
|
|
165
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
|
166
|
+
|
|
167
|
+
# @!method initialize(field:, operator:, values:)
|
|
168
|
+
# @param field [Symbol, Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Field] The property of the price to filter on.
|
|
169
|
+
#
|
|
170
|
+
# @param operator [Symbol, Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
|
171
|
+
#
|
|
172
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
|
173
|
+
|
|
174
|
+
# The property of the price to filter on.
|
|
175
|
+
#
|
|
176
|
+
# @see Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter#field
|
|
177
|
+
module Field
|
|
178
|
+
extend Orb::Internal::Type::Enum
|
|
179
|
+
|
|
180
|
+
PRICE_ID = :price_id
|
|
181
|
+
ITEM_ID = :item_id
|
|
182
|
+
PRICE_TYPE = :price_type
|
|
183
|
+
CURRENCY = :currency
|
|
184
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
|
185
|
+
|
|
186
|
+
# @!method self.values
|
|
187
|
+
# @return [Array<Symbol>]
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Should prices that match the filter be included or excluded.
|
|
191
|
+
#
|
|
192
|
+
# @see Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Filter#operator
|
|
193
|
+
module Operator
|
|
194
|
+
extend Orb::Internal::Type::Enum
|
|
195
|
+
|
|
196
|
+
INCLUDES = :includes
|
|
197
|
+
EXCLUDES = :excludes
|
|
198
|
+
|
|
199
|
+
# @!method self.values
|
|
200
|
+
# @return [Array<Symbol>]
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
class Tier < Orb::Internal::Type::BaseModel
|
|
205
|
+
# @!attribute lower_bound
|
|
206
|
+
# Exclusive lower bound of cumulative spend for this tier.
|
|
207
|
+
#
|
|
208
|
+
# @return [Float]
|
|
209
|
+
required :lower_bound, Float
|
|
210
|
+
|
|
211
|
+
# @!attribute percentage
|
|
212
|
+
# The percentage (between 0 and 1) discounted from spend that falls within this
|
|
213
|
+
# tier.
|
|
214
|
+
#
|
|
215
|
+
# @return [Float]
|
|
216
|
+
required :percentage, Float
|
|
217
|
+
|
|
218
|
+
# @!attribute upper_bound
|
|
219
|
+
# Inclusive upper bound of cumulative spend for this tier; null for the final
|
|
220
|
+
# open-ended tier.
|
|
221
|
+
#
|
|
222
|
+
# @return [Float, nil]
|
|
223
|
+
optional :upper_bound, Float, nil?: true
|
|
224
|
+
|
|
225
|
+
# @!method initialize(lower_bound:, percentage:, upper_bound: nil)
|
|
226
|
+
# Some parameter documentations has been truncated, see
|
|
227
|
+
# {Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount::Tier}
|
|
228
|
+
# for more details.
|
|
229
|
+
#
|
|
230
|
+
# One band of a tiered percentage discount. Bounds are denominated in the
|
|
231
|
+
# discount's currency. `lower_bound` is the exclusive start of the band and
|
|
232
|
+
# `upper_bound` is the inclusive end; `upper_bound` is null only for the
|
|
233
|
+
# open-ended final tier.
|
|
234
|
+
#
|
|
235
|
+
# @param lower_bound [Float] Exclusive lower bound of cumulative spend for this tier.
|
|
236
|
+
#
|
|
237
|
+
# @param percentage [Float] The percentage (between 0 and 1) discounted from spend that falls within this ti
|
|
238
|
+
#
|
|
239
|
+
# @param upper_bound [Float, nil] Inclusive upper bound of cumulative spend for this tier; null for the final open
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
|
|
61
243
|
# @!method self.variants
|
|
62
|
-
# @return [Array(Orb::Models::PlanPhaseUsageDiscountAdjustment, Orb::Models::PlanPhaseAmountDiscountAdjustment, Orb::Models::PlanPhasePercentageDiscountAdjustment, Orb::Models::PlanPhaseMinimumAdjustment, Orb::Models::PlanPhaseMaximumAdjustment)]
|
|
244
|
+
# @return [Array(Orb::Models::PlanPhaseUsageDiscountAdjustment, Orb::Models::PlanPhaseAmountDiscountAdjustment, Orb::Models::PlanPhasePercentageDiscountAdjustment, Orb::Models::AdjustmentInterval::Adjustment::TieredPercentageDiscount, Orb::Models::PlanPhaseMinimumAdjustment, Orb::Models::PlanPhaseMaximumAdjustment)]
|
|
63
245
|
end
|
|
64
246
|
end
|
|
65
247
|
end
|
data/lib/orb/models/alert.rb
CHANGED
|
@@ -87,7 +87,23 @@ module Orb
|
|
|
87
87
|
# @return [Orb::Models::Alert::LicenseType, nil]
|
|
88
88
|
optional :license_type, -> { Orb::Alert::LicenseType }, nil?: true
|
|
89
89
|
|
|
90
|
-
# @!
|
|
90
|
+
# @!attribute price_filters
|
|
91
|
+
# Filters scoping which prices are included in grouped cost alert evaluation.
|
|
92
|
+
#
|
|
93
|
+
# @return [Array<Orb::Models::Alert::PriceFilter>, nil]
|
|
94
|
+
optional :price_filters, -> { Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter] }, nil?: true
|
|
95
|
+
|
|
96
|
+
# @!attribute threshold_overrides
|
|
97
|
+
# Per-group threshold overrides. Each override maps a specific combination of
|
|
98
|
+
# grouping_keys values to a replacement threshold list. Only present for grouped
|
|
99
|
+
# cost alerts that have at least one override.
|
|
100
|
+
#
|
|
101
|
+
# @return [Array<Orb::Models::Alert::ThresholdOverride>, nil]
|
|
102
|
+
optional :threshold_overrides,
|
|
103
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride] },
|
|
104
|
+
nil?: true
|
|
105
|
+
|
|
106
|
+
# @!method initialize(id:, created_at:, currency:, customer:, enabled:, metric:, plan:, subscription:, thresholds:, type:, balance_alert_status: nil, grouping_keys: nil, license_type: nil, price_filters: nil, threshold_overrides: nil)
|
|
91
107
|
# Some parameter documentations has been truncated, see {Orb::Models::Alert} for
|
|
92
108
|
# more details.
|
|
93
109
|
#
|
|
@@ -122,6 +138,10 @@ module Orb
|
|
|
122
138
|
# @param grouping_keys [Array<String>, nil] The property keys to group cost alerts by. Only present for cost alerts with gro
|
|
123
139
|
#
|
|
124
140
|
# @param license_type [Orb::Models::Alert::LicenseType, nil] Minified license type for alert serialization.
|
|
141
|
+
#
|
|
142
|
+
# @param price_filters [Array<Orb::Models::Alert::PriceFilter>, nil] Filters scoping which prices are included in grouped cost alert evaluation.
|
|
143
|
+
#
|
|
144
|
+
# @param threshold_overrides [Array<Orb::Models::Alert::ThresholdOverride>, nil] Per-group threshold overrides. Each override maps a specific combination of grou
|
|
125
145
|
|
|
126
146
|
# @see Orb::Models::Alert#metric
|
|
127
147
|
class Metric < Orb::Internal::Type::BaseModel
|
|
@@ -226,6 +246,90 @@ module Orb
|
|
|
226
246
|
#
|
|
227
247
|
# @param id [String]
|
|
228
248
|
end
|
|
249
|
+
|
|
250
|
+
class PriceFilter < Orb::Internal::Type::BaseModel
|
|
251
|
+
# @!attribute field
|
|
252
|
+
# The property of the price to filter on.
|
|
253
|
+
#
|
|
254
|
+
# @return [Symbol, Orb::Models::Alert::PriceFilter::Field]
|
|
255
|
+
required :field, enum: -> { Orb::Alert::PriceFilter::Field }
|
|
256
|
+
|
|
257
|
+
# @!attribute operator
|
|
258
|
+
# Should prices that match the filter be included or excluded.
|
|
259
|
+
#
|
|
260
|
+
# @return [Symbol, Orb::Models::Alert::PriceFilter::Operator]
|
|
261
|
+
required :operator, enum: -> { Orb::Alert::PriceFilter::Operator }
|
|
262
|
+
|
|
263
|
+
# @!attribute values
|
|
264
|
+
# The IDs or values that match this filter.
|
|
265
|
+
#
|
|
266
|
+
# @return [Array<String>]
|
|
267
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
|
268
|
+
|
|
269
|
+
# @!method initialize(field:, operator:, values:)
|
|
270
|
+
# @param field [Symbol, Orb::Models::Alert::PriceFilter::Field] The property of the price to filter on.
|
|
271
|
+
#
|
|
272
|
+
# @param operator [Symbol, Orb::Models::Alert::PriceFilter::Operator] Should prices that match the filter be included or excluded.
|
|
273
|
+
#
|
|
274
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
|
275
|
+
|
|
276
|
+
# The property of the price to filter on.
|
|
277
|
+
#
|
|
278
|
+
# @see Orb::Models::Alert::PriceFilter#field
|
|
279
|
+
module Field
|
|
280
|
+
extend Orb::Internal::Type::Enum
|
|
281
|
+
|
|
282
|
+
PRICE_ID = :price_id
|
|
283
|
+
ITEM_ID = :item_id
|
|
284
|
+
PRICE_TYPE = :price_type
|
|
285
|
+
CURRENCY = :currency
|
|
286
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
|
287
|
+
|
|
288
|
+
# @!method self.values
|
|
289
|
+
# @return [Array<Symbol>]
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
# Should prices that match the filter be included or excluded.
|
|
293
|
+
#
|
|
294
|
+
# @see Orb::Models::Alert::PriceFilter#operator
|
|
295
|
+
module Operator
|
|
296
|
+
extend Orb::Internal::Type::Enum
|
|
297
|
+
|
|
298
|
+
INCLUDES = :includes
|
|
299
|
+
EXCLUDES = :excludes
|
|
300
|
+
|
|
301
|
+
# @!method self.values
|
|
302
|
+
# @return [Array<Symbol>]
|
|
303
|
+
end
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
class ThresholdOverride < Orb::Internal::Type::BaseModel
|
|
307
|
+
# @!attribute group_values
|
|
308
|
+
# The values of the grouping keys that identify this group. The list length
|
|
309
|
+
# matches the alert's grouping_keys.
|
|
310
|
+
#
|
|
311
|
+
# @return [Array<String>]
|
|
312
|
+
required :group_values, Orb::Internal::Type::ArrayOf[String]
|
|
313
|
+
|
|
314
|
+
# @!attribute thresholds
|
|
315
|
+
# The thresholds applied to this group. An empty list means the group is silenced.
|
|
316
|
+
#
|
|
317
|
+
# @return [Array<Orb::Models::Threshold>]
|
|
318
|
+
required :thresholds, -> { Orb::Internal::Type::ArrayOf[Orb::Threshold] }
|
|
319
|
+
|
|
320
|
+
# @!method initialize(group_values:, thresholds:)
|
|
321
|
+
# Some parameter documentations has been truncated, see
|
|
322
|
+
# {Orb::Models::Alert::ThresholdOverride} for more details.
|
|
323
|
+
#
|
|
324
|
+
# A per-group threshold override on a grouped cost alert.
|
|
325
|
+
#
|
|
326
|
+
# An empty `thresholds` list means the group is silenced (never fires). A
|
|
327
|
+
# non-empty list fully replaces the default thresholds for that group.
|
|
328
|
+
#
|
|
329
|
+
# @param group_values [Array<String>] The values of the grouping keys that identify this group. The list length matche
|
|
330
|
+
#
|
|
331
|
+
# @param thresholds [Array<Orb::Models::Threshold>] The thresholds applied to this group. An empty list means the group is silenced.
|
|
332
|
+
end
|
|
229
333
|
end
|
|
230
334
|
end
|
|
231
335
|
end
|
|
@@ -24,6 +24,13 @@ module Orb
|
|
|
24
24
|
# @return [Symbol, Orb::Models::AlertCreateForSubscriptionParams::Type]
|
|
25
25
|
required :type, enum: -> { Orb::AlertCreateForSubscriptionParams::Type }
|
|
26
26
|
|
|
27
|
+
# @!attribute currency
|
|
28
|
+
# The case sensitive currency or custom pricing unit to use for grouped cost
|
|
29
|
+
# alerts. Required when grouping_keys is set.
|
|
30
|
+
#
|
|
31
|
+
# @return [String, nil]
|
|
32
|
+
optional :currency, String, nil?: true
|
|
33
|
+
|
|
27
34
|
# @!attribute grouping_keys
|
|
28
35
|
# The property keys to group cost alerts by. Only applicable for cost_exceeded
|
|
29
36
|
# alerts.
|
|
@@ -37,14 +44,29 @@ module Orb
|
|
|
37
44
|
# @return [String, nil]
|
|
38
45
|
optional :metric_id, String, nil?: true
|
|
39
46
|
|
|
40
|
-
# @!attribute
|
|
41
|
-
#
|
|
42
|
-
#
|
|
47
|
+
# @!attribute price_filters
|
|
48
|
+
# Filters to scope which prices are included in grouped cost alert evaluation.
|
|
49
|
+
# Supports filtering by price_id, item_id, or price_type with includes/excludes
|
|
50
|
+
# operators. Only applicable when grouping_keys is set.
|
|
43
51
|
#
|
|
44
|
-
# @return [
|
|
45
|
-
optional :
|
|
52
|
+
# @return [Array<Orb::Models::AlertCreateForSubscriptionParams::PriceFilter>, nil]
|
|
53
|
+
optional :price_filters,
|
|
54
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::AlertCreateForSubscriptionParams::PriceFilter] },
|
|
55
|
+
nil?: true
|
|
56
|
+
|
|
57
|
+
# @!attribute threshold_overrides
|
|
58
|
+
# Per-group threshold overrides. Each override maps a specific combination of
|
|
59
|
+
# grouping_keys values to a list of thresholds that fully replaces the default
|
|
60
|
+
# thresholds for that group. An empty thresholds list silences the group. Groups
|
|
61
|
+
# without an override use the default thresholds. Only applicable when
|
|
62
|
+
# grouping_keys is set.
|
|
63
|
+
#
|
|
64
|
+
# @return [Array<Orb::Models::AlertCreateForSubscriptionParams::ThresholdOverride>, nil]
|
|
65
|
+
optional :threshold_overrides,
|
|
66
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::AlertCreateForSubscriptionParams::ThresholdOverride] },
|
|
67
|
+
nil?: true
|
|
46
68
|
|
|
47
|
-
# @!method initialize(subscription_id:, thresholds:, type:, grouping_keys: nil, metric_id: nil,
|
|
69
|
+
# @!method initialize(subscription_id:, thresholds:, type:, currency: nil, grouping_keys: nil, metric_id: nil, price_filters: nil, threshold_overrides: nil, request_options: {})
|
|
48
70
|
# Some parameter documentations has been truncated, see
|
|
49
71
|
# {Orb::Models::AlertCreateForSubscriptionParams} for more details.
|
|
50
72
|
#
|
|
@@ -54,11 +76,15 @@ module Orb
|
|
|
54
76
|
#
|
|
55
77
|
# @param type [Symbol, Orb::Models::AlertCreateForSubscriptionParams::Type] The type of alert to create. This must be a valid alert type.
|
|
56
78
|
#
|
|
79
|
+
# @param currency [String, nil] The case sensitive currency or custom pricing unit to use for grouped cost alert
|
|
80
|
+
#
|
|
57
81
|
# @param grouping_keys [Array<String>, nil] The property keys to group cost alerts by. Only applicable for cost_exceeded ale
|
|
58
82
|
#
|
|
59
83
|
# @param metric_id [String, nil] The metric to track usage for.
|
|
60
84
|
#
|
|
61
|
-
# @param
|
|
85
|
+
# @param price_filters [Array<Orb::Models::AlertCreateForSubscriptionParams::PriceFilter>, nil] Filters to scope which prices are included in grouped cost alert evaluation. Sup
|
|
86
|
+
#
|
|
87
|
+
# @param threshold_overrides [Array<Orb::Models::AlertCreateForSubscriptionParams::ThresholdOverride>, nil] Per-group threshold overrides. Each override maps a specific combination of grou
|
|
62
88
|
#
|
|
63
89
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
64
90
|
|
|
@@ -72,6 +98,93 @@ module Orb
|
|
|
72
98
|
# @!method self.values
|
|
73
99
|
# @return [Array<Symbol>]
|
|
74
100
|
end
|
|
101
|
+
|
|
102
|
+
class PriceFilter < Orb::Internal::Type::BaseModel
|
|
103
|
+
# @!attribute field
|
|
104
|
+
# The property of the price to filter on.
|
|
105
|
+
#
|
|
106
|
+
# @return [Symbol, Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::Field]
|
|
107
|
+
required :field, enum: -> { Orb::AlertCreateForSubscriptionParams::PriceFilter::Field }
|
|
108
|
+
|
|
109
|
+
# @!attribute operator
|
|
110
|
+
# Should prices that match the filter be included or excluded.
|
|
111
|
+
#
|
|
112
|
+
# @return [Symbol, Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::Operator]
|
|
113
|
+
required :operator, enum: -> { Orb::AlertCreateForSubscriptionParams::PriceFilter::Operator }
|
|
114
|
+
|
|
115
|
+
# @!attribute values
|
|
116
|
+
# The IDs or values that match this filter.
|
|
117
|
+
#
|
|
118
|
+
# @return [Array<String>]
|
|
119
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
|
120
|
+
|
|
121
|
+
# @!method initialize(field:, operator:, values:)
|
|
122
|
+
# @param field [Symbol, Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::Field] The property of the price to filter on.
|
|
123
|
+
#
|
|
124
|
+
# @param operator [Symbol, Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::Operator] Should prices that match the filter be included or excluded.
|
|
125
|
+
#
|
|
126
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
|
127
|
+
|
|
128
|
+
# The property of the price to filter on.
|
|
129
|
+
#
|
|
130
|
+
# @see Orb::Models::AlertCreateForSubscriptionParams::PriceFilter#field
|
|
131
|
+
module Field
|
|
132
|
+
extend Orb::Internal::Type::Enum
|
|
133
|
+
|
|
134
|
+
PRICE_ID = :price_id
|
|
135
|
+
ITEM_ID = :item_id
|
|
136
|
+
PRICE_TYPE = :price_type
|
|
137
|
+
CURRENCY = :currency
|
|
138
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
|
139
|
+
|
|
140
|
+
# @!method self.values
|
|
141
|
+
# @return [Array<Symbol>]
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Should prices that match the filter be included or excluded.
|
|
145
|
+
#
|
|
146
|
+
# @see Orb::Models::AlertCreateForSubscriptionParams::PriceFilter#operator
|
|
147
|
+
module Operator
|
|
148
|
+
extend Orb::Internal::Type::Enum
|
|
149
|
+
|
|
150
|
+
INCLUDES = :includes
|
|
151
|
+
EXCLUDES = :excludes
|
|
152
|
+
|
|
153
|
+
# @!method self.values
|
|
154
|
+
# @return [Array<Symbol>]
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
class ThresholdOverride < Orb::Internal::Type::BaseModel
|
|
159
|
+
# @!attribute group_values
|
|
160
|
+
# The values of the grouping keys that identify this group. The list length must
|
|
161
|
+
# match the alert's grouping_keys, and values appear in the same order as
|
|
162
|
+
# grouping_keys.
|
|
163
|
+
#
|
|
164
|
+
# @return [Array<String>]
|
|
165
|
+
required :group_values, Orb::Internal::Type::ArrayOf[String]
|
|
166
|
+
|
|
167
|
+
# @!attribute thresholds
|
|
168
|
+
# The thresholds to apply to this group. An empty list silences alerts for this
|
|
169
|
+
# group. A non-empty list fully replaces the default thresholds for this group.
|
|
170
|
+
#
|
|
171
|
+
# @return [Array<Orb::Models::Threshold>]
|
|
172
|
+
required :thresholds, -> { Orb::Internal::Type::ArrayOf[Orb::Threshold] }
|
|
173
|
+
|
|
174
|
+
# @!method initialize(group_values:, thresholds:)
|
|
175
|
+
# Some parameter documentations has been truncated, see
|
|
176
|
+
# {Orb::Models::AlertCreateForSubscriptionParams::ThresholdOverride} for more
|
|
177
|
+
# details.
|
|
178
|
+
#
|
|
179
|
+
# Per-group threshold override on a grouped cost alert.
|
|
180
|
+
#
|
|
181
|
+
# - An empty `thresholds` list silences alerts for this group (never fires).
|
|
182
|
+
# - A non-empty list fully replaces the default thresholds for this group.
|
|
183
|
+
#
|
|
184
|
+
# @param group_values [Array<String>] The values of the grouping keys that identify this group. The list length must m
|
|
185
|
+
#
|
|
186
|
+
# @param thresholds [Array<Orb::Models::Threshold>] The thresholds to apply to this group. An empty list silences alerts for this gr
|
|
187
|
+
end
|
|
75
188
|
end
|
|
76
189
|
end
|
|
77
190
|
end
|