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
|
@@ -238,6 +238,7 @@ module Orb
|
|
|
238
238
|
Orb::NewFloatingPackageWithAllocationPrice,
|
|
239
239
|
Orb::NewFloatingUnitWithPercentPrice,
|
|
240
240
|
Orb::NewFloatingMatrixWithAllocationPrice,
|
|
241
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts,
|
|
241
242
|
Orb::NewFloatingTieredWithProrationPrice,
|
|
242
243
|
Orb::NewFloatingUnitWithProrationPrice,
|
|
243
244
|
Orb::NewFloatingGroupedAllocationPrice,
|
|
@@ -252,6 +253,8 @@ module Orb
|
|
|
252
253
|
Orb::NewFloatingScalableMatrixWithTieredPricingPrice,
|
|
253
254
|
Orb::NewFloatingCumulativeGroupedBulkPrice,
|
|
254
255
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation,
|
|
256
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance,
|
|
257
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance,
|
|
255
258
|
Orb::NewFloatingMinimumCompositePrice,
|
|
256
259
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent,
|
|
257
260
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput
|
|
@@ -288,6 +291,7 @@ module Orb
|
|
|
288
291
|
Orb::NewFloatingPackageWithAllocationPrice::OrHash,
|
|
289
292
|
Orb::NewFloatingUnitWithPercentPrice::OrHash,
|
|
290
293
|
Orb::NewFloatingMatrixWithAllocationPrice::OrHash,
|
|
294
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::OrHash,
|
|
291
295
|
Orb::NewFloatingTieredWithProrationPrice::OrHash,
|
|
292
296
|
Orb::NewFloatingUnitWithProrationPrice::OrHash,
|
|
293
297
|
Orb::NewFloatingGroupedAllocationPrice::OrHash,
|
|
@@ -302,6 +306,8 @@ module Orb
|
|
|
302
306
|
Orb::NewFloatingScalableMatrixWithTieredPricingPrice::OrHash,
|
|
303
307
|
Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash,
|
|
304
308
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::OrHash,
|
|
309
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::OrHash,
|
|
310
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::OrHash,
|
|
305
311
|
Orb::NewFloatingMinimumCompositePrice::OrHash,
|
|
306
312
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent::OrHash,
|
|
307
313
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput::OrHash
|
|
@@ -356,6 +362,7 @@ module Orb
|
|
|
356
362
|
Orb::NewFloatingPackageWithAllocationPrice,
|
|
357
363
|
Orb::NewFloatingUnitWithPercentPrice,
|
|
358
364
|
Orb::NewFloatingMatrixWithAllocationPrice,
|
|
365
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts,
|
|
359
366
|
Orb::NewFloatingTieredWithProrationPrice,
|
|
360
367
|
Orb::NewFloatingUnitWithProrationPrice,
|
|
361
368
|
Orb::NewFloatingGroupedAllocationPrice,
|
|
@@ -370,6 +377,8 @@ module Orb
|
|
|
370
377
|
Orb::NewFloatingScalableMatrixWithTieredPricingPrice,
|
|
371
378
|
Orb::NewFloatingCumulativeGroupedBulkPrice,
|
|
372
379
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation,
|
|
380
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance,
|
|
381
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance,
|
|
373
382
|
Orb::NewFloatingMinimumCompositePrice,
|
|
374
383
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent,
|
|
375
384
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput
|
|
@@ -403,6 +412,7 @@ module Orb
|
|
|
403
412
|
Orb::NewFloatingPackageWithAllocationPrice,
|
|
404
413
|
Orb::NewFloatingUnitWithPercentPrice,
|
|
405
414
|
Orb::NewFloatingMatrixWithAllocationPrice,
|
|
415
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts,
|
|
406
416
|
Orb::NewFloatingTieredWithProrationPrice,
|
|
407
417
|
Orb::NewFloatingUnitWithProrationPrice,
|
|
408
418
|
Orb::NewFloatingGroupedAllocationPrice,
|
|
@@ -417,6 +427,8 @@ module Orb
|
|
|
417
427
|
Orb::NewFloatingScalableMatrixWithTieredPricingPrice,
|
|
418
428
|
Orb::NewFloatingCumulativeGroupedBulkPrice,
|
|
419
429
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation,
|
|
430
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance,
|
|
431
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance,
|
|
420
432
|
Orb::NewFloatingMinimumCompositePrice,
|
|
421
433
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent,
|
|
422
434
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput
|
|
@@ -883,11 +895,1280 @@ module Orb
|
|
|
883
895
|
end
|
|
884
896
|
end
|
|
885
897
|
|
|
898
|
+
class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel
|
|
899
|
+
OrHash =
|
|
900
|
+
T.type_alias do
|
|
901
|
+
T.any(
|
|
902
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts,
|
|
903
|
+
Orb::Internal::AnyHash
|
|
904
|
+
)
|
|
905
|
+
end
|
|
906
|
+
|
|
907
|
+
# The cadence to bill for this price on.
|
|
908
|
+
sig do
|
|
909
|
+
returns(
|
|
910
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol
|
|
911
|
+
)
|
|
912
|
+
end
|
|
913
|
+
attr_accessor :cadence
|
|
914
|
+
|
|
915
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
916
|
+
sig { returns(String) }
|
|
917
|
+
attr_accessor :currency
|
|
918
|
+
|
|
919
|
+
# The id of the item the price will be associated with.
|
|
920
|
+
sig { returns(String) }
|
|
921
|
+
attr_accessor :item_id
|
|
922
|
+
|
|
923
|
+
# Configuration for matrix_with_threshold_discounts pricing
|
|
924
|
+
sig do
|
|
925
|
+
returns(
|
|
926
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig
|
|
927
|
+
)
|
|
928
|
+
end
|
|
929
|
+
attr_reader :matrix_with_threshold_discounts_config
|
|
930
|
+
|
|
931
|
+
sig do
|
|
932
|
+
params(
|
|
933
|
+
matrix_with_threshold_discounts_config:
|
|
934
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash
|
|
935
|
+
).void
|
|
936
|
+
end
|
|
937
|
+
attr_writer :matrix_with_threshold_discounts_config
|
|
938
|
+
|
|
939
|
+
# The pricing model type
|
|
940
|
+
sig { returns(Symbol) }
|
|
941
|
+
attr_accessor :model_type
|
|
942
|
+
|
|
943
|
+
# The name of the price.
|
|
944
|
+
sig { returns(String) }
|
|
945
|
+
attr_accessor :name
|
|
946
|
+
|
|
947
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
948
|
+
# usage-based.
|
|
949
|
+
sig { returns(T.nilable(String)) }
|
|
950
|
+
attr_accessor :billable_metric_id
|
|
951
|
+
|
|
952
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
953
|
+
# this is true, and in-arrears if this is false.
|
|
954
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
955
|
+
attr_accessor :billed_in_advance
|
|
956
|
+
|
|
957
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
958
|
+
# months.
|
|
959
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
960
|
+
attr_reader :billing_cycle_configuration
|
|
961
|
+
|
|
962
|
+
sig do
|
|
963
|
+
params(
|
|
964
|
+
billing_cycle_configuration:
|
|
965
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
966
|
+
).void
|
|
967
|
+
end
|
|
968
|
+
attr_writer :billing_cycle_configuration
|
|
969
|
+
|
|
970
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
971
|
+
sig { returns(T.nilable(Float)) }
|
|
972
|
+
attr_accessor :conversion_rate
|
|
973
|
+
|
|
974
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
975
|
+
sig do
|
|
976
|
+
returns(
|
|
977
|
+
T.nilable(
|
|
978
|
+
T.any(
|
|
979
|
+
Orb::UnitConversionRateConfig,
|
|
980
|
+
Orb::TieredConversionRateConfig
|
|
981
|
+
)
|
|
982
|
+
)
|
|
983
|
+
)
|
|
984
|
+
end
|
|
985
|
+
attr_accessor :conversion_rate_config
|
|
986
|
+
|
|
987
|
+
# For dimensional price: specifies a price group and dimension values
|
|
988
|
+
sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
|
|
989
|
+
attr_reader :dimensional_price_configuration
|
|
990
|
+
|
|
991
|
+
sig do
|
|
992
|
+
params(
|
|
993
|
+
dimensional_price_configuration:
|
|
994
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
|
|
995
|
+
).void
|
|
996
|
+
end
|
|
997
|
+
attr_writer :dimensional_price_configuration
|
|
998
|
+
|
|
999
|
+
# An alias for the price.
|
|
1000
|
+
sig { returns(T.nilable(String)) }
|
|
1001
|
+
attr_accessor :external_price_id
|
|
1002
|
+
|
|
1003
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1004
|
+
# applied.
|
|
1005
|
+
sig { returns(T.nilable(Float)) }
|
|
1006
|
+
attr_accessor :fixed_price_quantity
|
|
1007
|
+
|
|
1008
|
+
# The property used to group this price on an invoice
|
|
1009
|
+
sig { returns(T.nilable(String)) }
|
|
1010
|
+
attr_accessor :invoice_grouping_key
|
|
1011
|
+
|
|
1012
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1013
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1014
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1015
|
+
attr_reader :invoicing_cycle_configuration
|
|
1016
|
+
|
|
1017
|
+
sig do
|
|
1018
|
+
params(
|
|
1019
|
+
invoicing_cycle_configuration:
|
|
1020
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1021
|
+
).void
|
|
1022
|
+
end
|
|
1023
|
+
attr_writer :invoicing_cycle_configuration
|
|
1024
|
+
|
|
1025
|
+
# The ID of the license type to associate with this price.
|
|
1026
|
+
sig { returns(T.nilable(String)) }
|
|
1027
|
+
attr_accessor :license_type_id
|
|
1028
|
+
|
|
1029
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1030
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1031
|
+
# by setting `metadata` to `null`.
|
|
1032
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
1033
|
+
attr_accessor :metadata
|
|
1034
|
+
|
|
1035
|
+
sig do
|
|
1036
|
+
params(
|
|
1037
|
+
cadence:
|
|
1038
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol,
|
|
1039
|
+
currency: String,
|
|
1040
|
+
item_id: String,
|
|
1041
|
+
matrix_with_threshold_discounts_config:
|
|
1042
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash,
|
|
1043
|
+
name: String,
|
|
1044
|
+
billable_metric_id: T.nilable(String),
|
|
1045
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1046
|
+
billing_cycle_configuration:
|
|
1047
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1048
|
+
conversion_rate: T.nilable(Float),
|
|
1049
|
+
conversion_rate_config:
|
|
1050
|
+
T.nilable(
|
|
1051
|
+
T.any(
|
|
1052
|
+
Orb::UnitConversionRateConfig::OrHash,
|
|
1053
|
+
Orb::TieredConversionRateConfig::OrHash
|
|
1054
|
+
)
|
|
1055
|
+
),
|
|
1056
|
+
dimensional_price_configuration:
|
|
1057
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
|
|
1058
|
+
external_price_id: T.nilable(String),
|
|
1059
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1060
|
+
invoice_grouping_key: T.nilable(String),
|
|
1061
|
+
invoicing_cycle_configuration:
|
|
1062
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1063
|
+
license_type_id: T.nilable(String),
|
|
1064
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
1065
|
+
model_type: Symbol
|
|
1066
|
+
).returns(T.attached_class)
|
|
1067
|
+
end
|
|
1068
|
+
def self.new(
|
|
1069
|
+
# The cadence to bill for this price on.
|
|
1070
|
+
cadence:,
|
|
1071
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
1072
|
+
currency:,
|
|
1073
|
+
# The id of the item the price will be associated with.
|
|
1074
|
+
item_id:,
|
|
1075
|
+
# Configuration for matrix_with_threshold_discounts pricing
|
|
1076
|
+
matrix_with_threshold_discounts_config:,
|
|
1077
|
+
# The name of the price.
|
|
1078
|
+
name:,
|
|
1079
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1080
|
+
# usage-based.
|
|
1081
|
+
billable_metric_id: nil,
|
|
1082
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1083
|
+
# this is true, and in-arrears if this is false.
|
|
1084
|
+
billed_in_advance: nil,
|
|
1085
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1086
|
+
# months.
|
|
1087
|
+
billing_cycle_configuration: nil,
|
|
1088
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1089
|
+
conversion_rate: nil,
|
|
1090
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1091
|
+
conversion_rate_config: nil,
|
|
1092
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1093
|
+
dimensional_price_configuration: nil,
|
|
1094
|
+
# An alias for the price.
|
|
1095
|
+
external_price_id: nil,
|
|
1096
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1097
|
+
# applied.
|
|
1098
|
+
fixed_price_quantity: nil,
|
|
1099
|
+
# The property used to group this price on an invoice
|
|
1100
|
+
invoice_grouping_key: nil,
|
|
1101
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1102
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1103
|
+
invoicing_cycle_configuration: nil,
|
|
1104
|
+
# The ID of the license type to associate with this price.
|
|
1105
|
+
license_type_id: nil,
|
|
1106
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1107
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1108
|
+
# by setting `metadata` to `null`.
|
|
1109
|
+
metadata: nil,
|
|
1110
|
+
# The pricing model type
|
|
1111
|
+
model_type: :matrix_with_threshold_discounts
|
|
1112
|
+
)
|
|
1113
|
+
end
|
|
1114
|
+
|
|
1115
|
+
sig do
|
|
1116
|
+
override.returns(
|
|
1117
|
+
{
|
|
1118
|
+
cadence:
|
|
1119
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol,
|
|
1120
|
+
currency: String,
|
|
1121
|
+
item_id: String,
|
|
1122
|
+
matrix_with_threshold_discounts_config:
|
|
1123
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig,
|
|
1124
|
+
model_type: Symbol,
|
|
1125
|
+
name: String,
|
|
1126
|
+
billable_metric_id: T.nilable(String),
|
|
1127
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1128
|
+
billing_cycle_configuration:
|
|
1129
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1130
|
+
conversion_rate: T.nilable(Float),
|
|
1131
|
+
conversion_rate_config:
|
|
1132
|
+
T.nilable(
|
|
1133
|
+
T.any(
|
|
1134
|
+
Orb::UnitConversionRateConfig,
|
|
1135
|
+
Orb::TieredConversionRateConfig
|
|
1136
|
+
)
|
|
1137
|
+
),
|
|
1138
|
+
dimensional_price_configuration:
|
|
1139
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration),
|
|
1140
|
+
external_price_id: T.nilable(String),
|
|
1141
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1142
|
+
invoice_grouping_key: T.nilable(String),
|
|
1143
|
+
invoicing_cycle_configuration:
|
|
1144
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1145
|
+
license_type_id: T.nilable(String),
|
|
1146
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)])
|
|
1147
|
+
}
|
|
1148
|
+
)
|
|
1149
|
+
end
|
|
1150
|
+
def to_hash
|
|
1151
|
+
end
|
|
1152
|
+
|
|
1153
|
+
# The cadence to bill for this price on.
|
|
1154
|
+
module Cadence
|
|
1155
|
+
extend Orb::Internal::Type::Enum
|
|
1156
|
+
|
|
1157
|
+
TaggedSymbol =
|
|
1158
|
+
T.type_alias do
|
|
1159
|
+
T.all(
|
|
1160
|
+
Symbol,
|
|
1161
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence
|
|
1162
|
+
)
|
|
1163
|
+
end
|
|
1164
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1165
|
+
|
|
1166
|
+
ANNUAL =
|
|
1167
|
+
T.let(
|
|
1168
|
+
:annual,
|
|
1169
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
|
|
1170
|
+
)
|
|
1171
|
+
SEMI_ANNUAL =
|
|
1172
|
+
T.let(
|
|
1173
|
+
:semi_annual,
|
|
1174
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
|
|
1175
|
+
)
|
|
1176
|
+
MONTHLY =
|
|
1177
|
+
T.let(
|
|
1178
|
+
:monthly,
|
|
1179
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
|
|
1180
|
+
)
|
|
1181
|
+
QUARTERLY =
|
|
1182
|
+
T.let(
|
|
1183
|
+
:quarterly,
|
|
1184
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
|
|
1185
|
+
)
|
|
1186
|
+
ONE_TIME =
|
|
1187
|
+
T.let(
|
|
1188
|
+
:one_time,
|
|
1189
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
|
|
1190
|
+
)
|
|
1191
|
+
CUSTOM =
|
|
1192
|
+
T.let(
|
|
1193
|
+
:custom,
|
|
1194
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
|
|
1195
|
+
)
|
|
1196
|
+
|
|
1197
|
+
sig do
|
|
1198
|
+
override.returns(
|
|
1199
|
+
T::Array[
|
|
1200
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
|
|
1201
|
+
]
|
|
1202
|
+
)
|
|
1203
|
+
end
|
|
1204
|
+
def self.values
|
|
1205
|
+
end
|
|
1206
|
+
end
|
|
1207
|
+
|
|
1208
|
+
class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel
|
|
1209
|
+
OrHash =
|
|
1210
|
+
T.type_alias do
|
|
1211
|
+
T.any(
|
|
1212
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig,
|
|
1213
|
+
Orb::Internal::AnyHash
|
|
1214
|
+
)
|
|
1215
|
+
end
|
|
1216
|
+
|
|
1217
|
+
# Unit price used for usage that does not match any defined matrix cell.
|
|
1218
|
+
sig { returns(String) }
|
|
1219
|
+
attr_accessor :default_unit_amount
|
|
1220
|
+
|
|
1221
|
+
# First matrix dimension key.
|
|
1222
|
+
sig { returns(String) }
|
|
1223
|
+
attr_accessor :first_dimension
|
|
1224
|
+
|
|
1225
|
+
# Per-cell unit prices.
|
|
1226
|
+
sig do
|
|
1227
|
+
returns(
|
|
1228
|
+
T::Array[
|
|
1229
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue
|
|
1230
|
+
]
|
|
1231
|
+
)
|
|
1232
|
+
end
|
|
1233
|
+
attr_accessor :matrix_values
|
|
1234
|
+
|
|
1235
|
+
# Optional second matrix dimension key.
|
|
1236
|
+
sig { returns(T.nilable(String)) }
|
|
1237
|
+
attr_accessor :second_dimension
|
|
1238
|
+
|
|
1239
|
+
sig do
|
|
1240
|
+
returns(
|
|
1241
|
+
T.nilable(
|
|
1242
|
+
T::Array[
|
|
1243
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup
|
|
1244
|
+
]
|
|
1245
|
+
)
|
|
1246
|
+
)
|
|
1247
|
+
end
|
|
1248
|
+
attr_reader :threshold_discount_groups
|
|
1249
|
+
|
|
1250
|
+
sig do
|
|
1251
|
+
params(
|
|
1252
|
+
threshold_discount_groups:
|
|
1253
|
+
T::Array[
|
|
1254
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash
|
|
1255
|
+
]
|
|
1256
|
+
).void
|
|
1257
|
+
end
|
|
1258
|
+
attr_writer :threshold_discount_groups
|
|
1259
|
+
|
|
1260
|
+
# Configuration for matrix_with_threshold_discounts pricing
|
|
1261
|
+
sig do
|
|
1262
|
+
params(
|
|
1263
|
+
default_unit_amount: String,
|
|
1264
|
+
first_dimension: String,
|
|
1265
|
+
matrix_values:
|
|
1266
|
+
T::Array[
|
|
1267
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash
|
|
1268
|
+
],
|
|
1269
|
+
second_dimension: T.nilable(String),
|
|
1270
|
+
threshold_discount_groups:
|
|
1271
|
+
T::Array[
|
|
1272
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash
|
|
1273
|
+
]
|
|
1274
|
+
).returns(T.attached_class)
|
|
1275
|
+
end
|
|
1276
|
+
def self.new(
|
|
1277
|
+
# Unit price used for usage that does not match any defined matrix cell.
|
|
1278
|
+
default_unit_amount:,
|
|
1279
|
+
# First matrix dimension key.
|
|
1280
|
+
first_dimension:,
|
|
1281
|
+
# Per-cell unit prices.
|
|
1282
|
+
matrix_values:,
|
|
1283
|
+
# Optional second matrix dimension key.
|
|
1284
|
+
second_dimension: nil,
|
|
1285
|
+
threshold_discount_groups: nil
|
|
1286
|
+
)
|
|
1287
|
+
end
|
|
1288
|
+
|
|
1289
|
+
sig do
|
|
1290
|
+
override.returns(
|
|
1291
|
+
{
|
|
1292
|
+
default_unit_amount: String,
|
|
1293
|
+
first_dimension: String,
|
|
1294
|
+
matrix_values:
|
|
1295
|
+
T::Array[
|
|
1296
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue
|
|
1297
|
+
],
|
|
1298
|
+
second_dimension: T.nilable(String),
|
|
1299
|
+
threshold_discount_groups:
|
|
1300
|
+
T::Array[
|
|
1301
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup
|
|
1302
|
+
]
|
|
1303
|
+
}
|
|
1304
|
+
)
|
|
1305
|
+
end
|
|
1306
|
+
def to_hash
|
|
1307
|
+
end
|
|
1308
|
+
|
|
1309
|
+
class MatrixValue < Orb::Internal::Type::BaseModel
|
|
1310
|
+
OrHash =
|
|
1311
|
+
T.type_alias do
|
|
1312
|
+
T.any(
|
|
1313
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue,
|
|
1314
|
+
Orb::Internal::AnyHash
|
|
1315
|
+
)
|
|
1316
|
+
end
|
|
1317
|
+
|
|
1318
|
+
sig { returns(String) }
|
|
1319
|
+
attr_accessor :first_dimension_value
|
|
1320
|
+
|
|
1321
|
+
sig { returns(String) }
|
|
1322
|
+
attr_accessor :unit_amount
|
|
1323
|
+
|
|
1324
|
+
sig { returns(T.nilable(String)) }
|
|
1325
|
+
attr_accessor :second_dimension_value
|
|
1326
|
+
|
|
1327
|
+
sig do
|
|
1328
|
+
params(
|
|
1329
|
+
first_dimension_value: String,
|
|
1330
|
+
unit_amount: String,
|
|
1331
|
+
second_dimension_value: T.nilable(String)
|
|
1332
|
+
).returns(T.attached_class)
|
|
1333
|
+
end
|
|
1334
|
+
def self.new(
|
|
1335
|
+
first_dimension_value:,
|
|
1336
|
+
unit_amount:,
|
|
1337
|
+
second_dimension_value: nil
|
|
1338
|
+
)
|
|
1339
|
+
end
|
|
1340
|
+
|
|
1341
|
+
sig do
|
|
1342
|
+
override.returns(
|
|
1343
|
+
{
|
|
1344
|
+
first_dimension_value: String,
|
|
1345
|
+
unit_amount: String,
|
|
1346
|
+
second_dimension_value: T.nilable(String)
|
|
1347
|
+
}
|
|
1348
|
+
)
|
|
1349
|
+
end
|
|
1350
|
+
def to_hash
|
|
1351
|
+
end
|
|
1352
|
+
end
|
|
1353
|
+
|
|
1354
|
+
class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel
|
|
1355
|
+
OrHash =
|
|
1356
|
+
T.type_alias do
|
|
1357
|
+
T.any(
|
|
1358
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup,
|
|
1359
|
+
Orb::Internal::AnyHash
|
|
1360
|
+
)
|
|
1361
|
+
end
|
|
1362
|
+
|
|
1363
|
+
# Discount rate applied to spend above the threshold.
|
|
1364
|
+
sig { returns(String) }
|
|
1365
|
+
attr_accessor :above_threshold_discount_percentage
|
|
1366
|
+
|
|
1367
|
+
# Discount rate applied to spend at or below the threshold. Set to 0 for no
|
|
1368
|
+
# baseline discount.
|
|
1369
|
+
sig { returns(String) }
|
|
1370
|
+
attr_accessor :below_threshold_discount_percentage
|
|
1371
|
+
|
|
1372
|
+
# Semicolon-separated list of matrix cell coordinates targeted by this group. Each
|
|
1373
|
+
# coordinate is `first,second` when the matrix has two dimensions, or just `first`
|
|
1374
|
+
# for a single-dimension matrix. Example: `blue,circle;green,triangle`.
|
|
1375
|
+
sig { returns(String) }
|
|
1376
|
+
attr_accessor :cell_coordinates
|
|
1377
|
+
|
|
1378
|
+
sig { returns(String) }
|
|
1379
|
+
attr_accessor :threshold_amount
|
|
1380
|
+
|
|
1381
|
+
sig { returns(T.nilable(String)) }
|
|
1382
|
+
attr_accessor :description
|
|
1383
|
+
|
|
1384
|
+
sig do
|
|
1385
|
+
params(
|
|
1386
|
+
above_threshold_discount_percentage: String,
|
|
1387
|
+
below_threshold_discount_percentage: String,
|
|
1388
|
+
cell_coordinates: String,
|
|
1389
|
+
threshold_amount: String,
|
|
1390
|
+
description: T.nilable(String)
|
|
1391
|
+
).returns(T.attached_class)
|
|
1392
|
+
end
|
|
1393
|
+
def self.new(
|
|
1394
|
+
# Discount rate applied to spend above the threshold.
|
|
1395
|
+
above_threshold_discount_percentage:,
|
|
1396
|
+
# Discount rate applied to spend at or below the threshold. Set to 0 for no
|
|
1397
|
+
# baseline discount.
|
|
1398
|
+
below_threshold_discount_percentage:,
|
|
1399
|
+
# Semicolon-separated list of matrix cell coordinates targeted by this group. Each
|
|
1400
|
+
# coordinate is `first,second` when the matrix has two dimensions, or just `first`
|
|
1401
|
+
# for a single-dimension matrix. Example: `blue,circle;green,triangle`.
|
|
1402
|
+
cell_coordinates:,
|
|
1403
|
+
threshold_amount:,
|
|
1404
|
+
description: nil
|
|
1405
|
+
)
|
|
1406
|
+
end
|
|
1407
|
+
|
|
1408
|
+
sig do
|
|
1409
|
+
override.returns(
|
|
1410
|
+
{
|
|
1411
|
+
above_threshold_discount_percentage: String,
|
|
1412
|
+
below_threshold_discount_percentage: String,
|
|
1413
|
+
cell_coordinates: String,
|
|
1414
|
+
threshold_amount: String,
|
|
1415
|
+
description: T.nilable(String)
|
|
1416
|
+
}
|
|
1417
|
+
)
|
|
1418
|
+
end
|
|
1419
|
+
def to_hash
|
|
1420
|
+
end
|
|
1421
|
+
end
|
|
1422
|
+
end
|
|
1423
|
+
end
|
|
1424
|
+
|
|
886
1425
|
class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel
|
|
887
1426
|
OrHash =
|
|
888
1427
|
T.type_alias do
|
|
889
1428
|
T.any(
|
|
890
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds,
|
|
1429
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds,
|
|
1430
|
+
Orb::Internal::AnyHash
|
|
1431
|
+
)
|
|
1432
|
+
end
|
|
1433
|
+
|
|
1434
|
+
# The cadence to bill for this price on.
|
|
1435
|
+
sig do
|
|
1436
|
+
returns(
|
|
1437
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol
|
|
1438
|
+
)
|
|
1439
|
+
end
|
|
1440
|
+
attr_accessor :cadence
|
|
1441
|
+
|
|
1442
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
1443
|
+
sig { returns(String) }
|
|
1444
|
+
attr_accessor :currency
|
|
1445
|
+
|
|
1446
|
+
# Configuration for grouped_with_min_max_thresholds pricing
|
|
1447
|
+
sig do
|
|
1448
|
+
returns(
|
|
1449
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig
|
|
1450
|
+
)
|
|
1451
|
+
end
|
|
1452
|
+
attr_reader :grouped_with_min_max_thresholds_config
|
|
1453
|
+
|
|
1454
|
+
sig do
|
|
1455
|
+
params(
|
|
1456
|
+
grouped_with_min_max_thresholds_config:
|
|
1457
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash
|
|
1458
|
+
).void
|
|
1459
|
+
end
|
|
1460
|
+
attr_writer :grouped_with_min_max_thresholds_config
|
|
1461
|
+
|
|
1462
|
+
# The id of the item the price will be associated with.
|
|
1463
|
+
sig { returns(String) }
|
|
1464
|
+
attr_accessor :item_id
|
|
1465
|
+
|
|
1466
|
+
# The pricing model type
|
|
1467
|
+
sig { returns(Symbol) }
|
|
1468
|
+
attr_accessor :model_type
|
|
1469
|
+
|
|
1470
|
+
# The name of the price.
|
|
1471
|
+
sig { returns(String) }
|
|
1472
|
+
attr_accessor :name
|
|
1473
|
+
|
|
1474
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1475
|
+
# usage-based.
|
|
1476
|
+
sig { returns(T.nilable(String)) }
|
|
1477
|
+
attr_accessor :billable_metric_id
|
|
1478
|
+
|
|
1479
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1480
|
+
# this is true, and in-arrears if this is false.
|
|
1481
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
1482
|
+
attr_accessor :billed_in_advance
|
|
1483
|
+
|
|
1484
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1485
|
+
# months.
|
|
1486
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1487
|
+
attr_reader :billing_cycle_configuration
|
|
1488
|
+
|
|
1489
|
+
sig do
|
|
1490
|
+
params(
|
|
1491
|
+
billing_cycle_configuration:
|
|
1492
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1493
|
+
).void
|
|
1494
|
+
end
|
|
1495
|
+
attr_writer :billing_cycle_configuration
|
|
1496
|
+
|
|
1497
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1498
|
+
sig { returns(T.nilable(Float)) }
|
|
1499
|
+
attr_accessor :conversion_rate
|
|
1500
|
+
|
|
1501
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1502
|
+
sig do
|
|
1503
|
+
returns(
|
|
1504
|
+
T.nilable(
|
|
1505
|
+
T.any(
|
|
1506
|
+
Orb::UnitConversionRateConfig,
|
|
1507
|
+
Orb::TieredConversionRateConfig
|
|
1508
|
+
)
|
|
1509
|
+
)
|
|
1510
|
+
)
|
|
1511
|
+
end
|
|
1512
|
+
attr_accessor :conversion_rate_config
|
|
1513
|
+
|
|
1514
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1515
|
+
sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
|
|
1516
|
+
attr_reader :dimensional_price_configuration
|
|
1517
|
+
|
|
1518
|
+
sig do
|
|
1519
|
+
params(
|
|
1520
|
+
dimensional_price_configuration:
|
|
1521
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
|
|
1522
|
+
).void
|
|
1523
|
+
end
|
|
1524
|
+
attr_writer :dimensional_price_configuration
|
|
1525
|
+
|
|
1526
|
+
# An alias for the price.
|
|
1527
|
+
sig { returns(T.nilable(String)) }
|
|
1528
|
+
attr_accessor :external_price_id
|
|
1529
|
+
|
|
1530
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1531
|
+
# applied.
|
|
1532
|
+
sig { returns(T.nilable(Float)) }
|
|
1533
|
+
attr_accessor :fixed_price_quantity
|
|
1534
|
+
|
|
1535
|
+
# The property used to group this price on an invoice
|
|
1536
|
+
sig { returns(T.nilable(String)) }
|
|
1537
|
+
attr_accessor :invoice_grouping_key
|
|
1538
|
+
|
|
1539
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1540
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1541
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1542
|
+
attr_reader :invoicing_cycle_configuration
|
|
1543
|
+
|
|
1544
|
+
sig do
|
|
1545
|
+
params(
|
|
1546
|
+
invoicing_cycle_configuration:
|
|
1547
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1548
|
+
).void
|
|
1549
|
+
end
|
|
1550
|
+
attr_writer :invoicing_cycle_configuration
|
|
1551
|
+
|
|
1552
|
+
# The ID of the license type to associate with this price.
|
|
1553
|
+
sig { returns(T.nilable(String)) }
|
|
1554
|
+
attr_accessor :license_type_id
|
|
1555
|
+
|
|
1556
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1557
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1558
|
+
# by setting `metadata` to `null`.
|
|
1559
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
1560
|
+
attr_accessor :metadata
|
|
1561
|
+
|
|
1562
|
+
sig do
|
|
1563
|
+
params(
|
|
1564
|
+
cadence:
|
|
1565
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol,
|
|
1566
|
+
currency: String,
|
|
1567
|
+
grouped_with_min_max_thresholds_config:
|
|
1568
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash,
|
|
1569
|
+
item_id: String,
|
|
1570
|
+
name: String,
|
|
1571
|
+
billable_metric_id: T.nilable(String),
|
|
1572
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1573
|
+
billing_cycle_configuration:
|
|
1574
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1575
|
+
conversion_rate: T.nilable(Float),
|
|
1576
|
+
conversion_rate_config:
|
|
1577
|
+
T.nilable(
|
|
1578
|
+
T.any(
|
|
1579
|
+
Orb::UnitConversionRateConfig::OrHash,
|
|
1580
|
+
Orb::TieredConversionRateConfig::OrHash
|
|
1581
|
+
)
|
|
1582
|
+
),
|
|
1583
|
+
dimensional_price_configuration:
|
|
1584
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
|
|
1585
|
+
external_price_id: T.nilable(String),
|
|
1586
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1587
|
+
invoice_grouping_key: T.nilable(String),
|
|
1588
|
+
invoicing_cycle_configuration:
|
|
1589
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1590
|
+
license_type_id: T.nilable(String),
|
|
1591
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
1592
|
+
model_type: Symbol
|
|
1593
|
+
).returns(T.attached_class)
|
|
1594
|
+
end
|
|
1595
|
+
def self.new(
|
|
1596
|
+
# The cadence to bill for this price on.
|
|
1597
|
+
cadence:,
|
|
1598
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
1599
|
+
currency:,
|
|
1600
|
+
# Configuration for grouped_with_min_max_thresholds pricing
|
|
1601
|
+
grouped_with_min_max_thresholds_config:,
|
|
1602
|
+
# The id of the item the price will be associated with.
|
|
1603
|
+
item_id:,
|
|
1604
|
+
# The name of the price.
|
|
1605
|
+
name:,
|
|
1606
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1607
|
+
# usage-based.
|
|
1608
|
+
billable_metric_id: nil,
|
|
1609
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1610
|
+
# this is true, and in-arrears if this is false.
|
|
1611
|
+
billed_in_advance: nil,
|
|
1612
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1613
|
+
# months.
|
|
1614
|
+
billing_cycle_configuration: nil,
|
|
1615
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1616
|
+
conversion_rate: nil,
|
|
1617
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1618
|
+
conversion_rate_config: nil,
|
|
1619
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1620
|
+
dimensional_price_configuration: nil,
|
|
1621
|
+
# An alias for the price.
|
|
1622
|
+
external_price_id: nil,
|
|
1623
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1624
|
+
# applied.
|
|
1625
|
+
fixed_price_quantity: nil,
|
|
1626
|
+
# The property used to group this price on an invoice
|
|
1627
|
+
invoice_grouping_key: nil,
|
|
1628
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1629
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1630
|
+
invoicing_cycle_configuration: nil,
|
|
1631
|
+
# The ID of the license type to associate with this price.
|
|
1632
|
+
license_type_id: nil,
|
|
1633
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1634
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1635
|
+
# by setting `metadata` to `null`.
|
|
1636
|
+
metadata: nil,
|
|
1637
|
+
# The pricing model type
|
|
1638
|
+
model_type: :grouped_with_min_max_thresholds
|
|
1639
|
+
)
|
|
1640
|
+
end
|
|
1641
|
+
|
|
1642
|
+
sig do
|
|
1643
|
+
override.returns(
|
|
1644
|
+
{
|
|
1645
|
+
cadence:
|
|
1646
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol,
|
|
1647
|
+
currency: String,
|
|
1648
|
+
grouped_with_min_max_thresholds_config:
|
|
1649
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig,
|
|
1650
|
+
item_id: String,
|
|
1651
|
+
model_type: Symbol,
|
|
1652
|
+
name: String,
|
|
1653
|
+
billable_metric_id: T.nilable(String),
|
|
1654
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1655
|
+
billing_cycle_configuration:
|
|
1656
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1657
|
+
conversion_rate: T.nilable(Float),
|
|
1658
|
+
conversion_rate_config:
|
|
1659
|
+
T.nilable(
|
|
1660
|
+
T.any(
|
|
1661
|
+
Orb::UnitConversionRateConfig,
|
|
1662
|
+
Orb::TieredConversionRateConfig
|
|
1663
|
+
)
|
|
1664
|
+
),
|
|
1665
|
+
dimensional_price_configuration:
|
|
1666
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration),
|
|
1667
|
+
external_price_id: T.nilable(String),
|
|
1668
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1669
|
+
invoice_grouping_key: T.nilable(String),
|
|
1670
|
+
invoicing_cycle_configuration:
|
|
1671
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1672
|
+
license_type_id: T.nilable(String),
|
|
1673
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)])
|
|
1674
|
+
}
|
|
1675
|
+
)
|
|
1676
|
+
end
|
|
1677
|
+
def to_hash
|
|
1678
|
+
end
|
|
1679
|
+
|
|
1680
|
+
# The cadence to bill for this price on.
|
|
1681
|
+
module Cadence
|
|
1682
|
+
extend Orb::Internal::Type::Enum
|
|
1683
|
+
|
|
1684
|
+
TaggedSymbol =
|
|
1685
|
+
T.type_alias do
|
|
1686
|
+
T.all(
|
|
1687
|
+
Symbol,
|
|
1688
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence
|
|
1689
|
+
)
|
|
1690
|
+
end
|
|
1691
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1692
|
+
|
|
1693
|
+
ANNUAL =
|
|
1694
|
+
T.let(
|
|
1695
|
+
:annual,
|
|
1696
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
1697
|
+
)
|
|
1698
|
+
SEMI_ANNUAL =
|
|
1699
|
+
T.let(
|
|
1700
|
+
:semi_annual,
|
|
1701
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
1702
|
+
)
|
|
1703
|
+
MONTHLY =
|
|
1704
|
+
T.let(
|
|
1705
|
+
:monthly,
|
|
1706
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
1707
|
+
)
|
|
1708
|
+
QUARTERLY =
|
|
1709
|
+
T.let(
|
|
1710
|
+
:quarterly,
|
|
1711
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
1712
|
+
)
|
|
1713
|
+
ONE_TIME =
|
|
1714
|
+
T.let(
|
|
1715
|
+
:one_time,
|
|
1716
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
1717
|
+
)
|
|
1718
|
+
CUSTOM =
|
|
1719
|
+
T.let(
|
|
1720
|
+
:custom,
|
|
1721
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
1722
|
+
)
|
|
1723
|
+
|
|
1724
|
+
sig do
|
|
1725
|
+
override.returns(
|
|
1726
|
+
T::Array[
|
|
1727
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
1728
|
+
]
|
|
1729
|
+
)
|
|
1730
|
+
end
|
|
1731
|
+
def self.values
|
|
1732
|
+
end
|
|
1733
|
+
end
|
|
1734
|
+
|
|
1735
|
+
class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel
|
|
1736
|
+
OrHash =
|
|
1737
|
+
T.type_alias do
|
|
1738
|
+
T.any(
|
|
1739
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig,
|
|
1740
|
+
Orb::Internal::AnyHash
|
|
1741
|
+
)
|
|
1742
|
+
end
|
|
1743
|
+
|
|
1744
|
+
# The event property used to group before applying thresholds
|
|
1745
|
+
sig { returns(String) }
|
|
1746
|
+
attr_accessor :grouping_key
|
|
1747
|
+
|
|
1748
|
+
# The maximum amount to charge each group
|
|
1749
|
+
sig { returns(String) }
|
|
1750
|
+
attr_accessor :maximum_charge
|
|
1751
|
+
|
|
1752
|
+
# The minimum amount to charge each group, regardless of usage
|
|
1753
|
+
sig { returns(String) }
|
|
1754
|
+
attr_accessor :minimum_charge
|
|
1755
|
+
|
|
1756
|
+
# The base price charged per group
|
|
1757
|
+
sig { returns(String) }
|
|
1758
|
+
attr_accessor :per_unit_rate
|
|
1759
|
+
|
|
1760
|
+
# Configuration for grouped_with_min_max_thresholds pricing
|
|
1761
|
+
sig do
|
|
1762
|
+
params(
|
|
1763
|
+
grouping_key: String,
|
|
1764
|
+
maximum_charge: String,
|
|
1765
|
+
minimum_charge: String,
|
|
1766
|
+
per_unit_rate: String
|
|
1767
|
+
).returns(T.attached_class)
|
|
1768
|
+
end
|
|
1769
|
+
def self.new(
|
|
1770
|
+
# The event property used to group before applying thresholds
|
|
1771
|
+
grouping_key:,
|
|
1772
|
+
# The maximum amount to charge each group
|
|
1773
|
+
maximum_charge:,
|
|
1774
|
+
# The minimum amount to charge each group, regardless of usage
|
|
1775
|
+
minimum_charge:,
|
|
1776
|
+
# The base price charged per group
|
|
1777
|
+
per_unit_rate:
|
|
1778
|
+
)
|
|
1779
|
+
end
|
|
1780
|
+
|
|
1781
|
+
sig do
|
|
1782
|
+
override.returns(
|
|
1783
|
+
{
|
|
1784
|
+
grouping_key: String,
|
|
1785
|
+
maximum_charge: String,
|
|
1786
|
+
minimum_charge: String,
|
|
1787
|
+
per_unit_rate: String
|
|
1788
|
+
}
|
|
1789
|
+
)
|
|
1790
|
+
end
|
|
1791
|
+
def to_hash
|
|
1792
|
+
end
|
|
1793
|
+
end
|
|
1794
|
+
end
|
|
1795
|
+
|
|
1796
|
+
class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel
|
|
1797
|
+
OrHash =
|
|
1798
|
+
T.type_alias do
|
|
1799
|
+
T.any(
|
|
1800
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation,
|
|
1801
|
+
Orb::Internal::AnyHash
|
|
1802
|
+
)
|
|
1803
|
+
end
|
|
1804
|
+
|
|
1805
|
+
# The cadence to bill for this price on.
|
|
1806
|
+
sig do
|
|
1807
|
+
returns(
|
|
1808
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::OrSymbol
|
|
1809
|
+
)
|
|
1810
|
+
end
|
|
1811
|
+
attr_accessor :cadence
|
|
1812
|
+
|
|
1813
|
+
# Configuration for cumulative_grouped_allocation pricing
|
|
1814
|
+
sig do
|
|
1815
|
+
returns(
|
|
1816
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig
|
|
1817
|
+
)
|
|
1818
|
+
end
|
|
1819
|
+
attr_reader :cumulative_grouped_allocation_config
|
|
1820
|
+
|
|
1821
|
+
sig do
|
|
1822
|
+
params(
|
|
1823
|
+
cumulative_grouped_allocation_config:
|
|
1824
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash
|
|
1825
|
+
).void
|
|
1826
|
+
end
|
|
1827
|
+
attr_writer :cumulative_grouped_allocation_config
|
|
1828
|
+
|
|
1829
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
1830
|
+
sig { returns(String) }
|
|
1831
|
+
attr_accessor :currency
|
|
1832
|
+
|
|
1833
|
+
# The id of the item the price will be associated with.
|
|
1834
|
+
sig { returns(String) }
|
|
1835
|
+
attr_accessor :item_id
|
|
1836
|
+
|
|
1837
|
+
# The pricing model type
|
|
1838
|
+
sig { returns(Symbol) }
|
|
1839
|
+
attr_accessor :model_type
|
|
1840
|
+
|
|
1841
|
+
# The name of the price.
|
|
1842
|
+
sig { returns(String) }
|
|
1843
|
+
attr_accessor :name
|
|
1844
|
+
|
|
1845
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1846
|
+
# usage-based.
|
|
1847
|
+
sig { returns(T.nilable(String)) }
|
|
1848
|
+
attr_accessor :billable_metric_id
|
|
1849
|
+
|
|
1850
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1851
|
+
# this is true, and in-arrears if this is false.
|
|
1852
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
1853
|
+
attr_accessor :billed_in_advance
|
|
1854
|
+
|
|
1855
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1856
|
+
# months.
|
|
1857
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1858
|
+
attr_reader :billing_cycle_configuration
|
|
1859
|
+
|
|
1860
|
+
sig do
|
|
1861
|
+
params(
|
|
1862
|
+
billing_cycle_configuration:
|
|
1863
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1864
|
+
).void
|
|
1865
|
+
end
|
|
1866
|
+
attr_writer :billing_cycle_configuration
|
|
1867
|
+
|
|
1868
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1869
|
+
sig { returns(T.nilable(Float)) }
|
|
1870
|
+
attr_accessor :conversion_rate
|
|
1871
|
+
|
|
1872
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1873
|
+
sig do
|
|
1874
|
+
returns(
|
|
1875
|
+
T.nilable(
|
|
1876
|
+
T.any(
|
|
1877
|
+
Orb::UnitConversionRateConfig,
|
|
1878
|
+
Orb::TieredConversionRateConfig
|
|
1879
|
+
)
|
|
1880
|
+
)
|
|
1881
|
+
)
|
|
1882
|
+
end
|
|
1883
|
+
attr_accessor :conversion_rate_config
|
|
1884
|
+
|
|
1885
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1886
|
+
sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
|
|
1887
|
+
attr_reader :dimensional_price_configuration
|
|
1888
|
+
|
|
1889
|
+
sig do
|
|
1890
|
+
params(
|
|
1891
|
+
dimensional_price_configuration:
|
|
1892
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
|
|
1893
|
+
).void
|
|
1894
|
+
end
|
|
1895
|
+
attr_writer :dimensional_price_configuration
|
|
1896
|
+
|
|
1897
|
+
# An alias for the price.
|
|
1898
|
+
sig { returns(T.nilable(String)) }
|
|
1899
|
+
attr_accessor :external_price_id
|
|
1900
|
+
|
|
1901
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1902
|
+
# applied.
|
|
1903
|
+
sig { returns(T.nilable(Float)) }
|
|
1904
|
+
attr_accessor :fixed_price_quantity
|
|
1905
|
+
|
|
1906
|
+
# The property used to group this price on an invoice
|
|
1907
|
+
sig { returns(T.nilable(String)) }
|
|
1908
|
+
attr_accessor :invoice_grouping_key
|
|
1909
|
+
|
|
1910
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1911
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1912
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1913
|
+
attr_reader :invoicing_cycle_configuration
|
|
1914
|
+
|
|
1915
|
+
sig do
|
|
1916
|
+
params(
|
|
1917
|
+
invoicing_cycle_configuration:
|
|
1918
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1919
|
+
).void
|
|
1920
|
+
end
|
|
1921
|
+
attr_writer :invoicing_cycle_configuration
|
|
1922
|
+
|
|
1923
|
+
# The ID of the license type to associate with this price.
|
|
1924
|
+
sig { returns(T.nilable(String)) }
|
|
1925
|
+
attr_accessor :license_type_id
|
|
1926
|
+
|
|
1927
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1928
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1929
|
+
# by setting `metadata` to `null`.
|
|
1930
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
1931
|
+
attr_accessor :metadata
|
|
1932
|
+
|
|
1933
|
+
sig do
|
|
1934
|
+
params(
|
|
1935
|
+
cadence:
|
|
1936
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::OrSymbol,
|
|
1937
|
+
cumulative_grouped_allocation_config:
|
|
1938
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash,
|
|
1939
|
+
currency: String,
|
|
1940
|
+
item_id: String,
|
|
1941
|
+
name: String,
|
|
1942
|
+
billable_metric_id: T.nilable(String),
|
|
1943
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1944
|
+
billing_cycle_configuration:
|
|
1945
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1946
|
+
conversion_rate: T.nilable(Float),
|
|
1947
|
+
conversion_rate_config:
|
|
1948
|
+
T.nilable(
|
|
1949
|
+
T.any(
|
|
1950
|
+
Orb::UnitConversionRateConfig::OrHash,
|
|
1951
|
+
Orb::TieredConversionRateConfig::OrHash
|
|
1952
|
+
)
|
|
1953
|
+
),
|
|
1954
|
+
dimensional_price_configuration:
|
|
1955
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
|
|
1956
|
+
external_price_id: T.nilable(String),
|
|
1957
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1958
|
+
invoice_grouping_key: T.nilable(String),
|
|
1959
|
+
invoicing_cycle_configuration:
|
|
1960
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1961
|
+
license_type_id: T.nilable(String),
|
|
1962
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
1963
|
+
model_type: Symbol
|
|
1964
|
+
).returns(T.attached_class)
|
|
1965
|
+
end
|
|
1966
|
+
def self.new(
|
|
1967
|
+
# The cadence to bill for this price on.
|
|
1968
|
+
cadence:,
|
|
1969
|
+
# Configuration for cumulative_grouped_allocation pricing
|
|
1970
|
+
cumulative_grouped_allocation_config:,
|
|
1971
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
1972
|
+
currency:,
|
|
1973
|
+
# The id of the item the price will be associated with.
|
|
1974
|
+
item_id:,
|
|
1975
|
+
# The name of the price.
|
|
1976
|
+
name:,
|
|
1977
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1978
|
+
# usage-based.
|
|
1979
|
+
billable_metric_id: nil,
|
|
1980
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1981
|
+
# this is true, and in-arrears if this is false.
|
|
1982
|
+
billed_in_advance: nil,
|
|
1983
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1984
|
+
# months.
|
|
1985
|
+
billing_cycle_configuration: nil,
|
|
1986
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1987
|
+
conversion_rate: nil,
|
|
1988
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1989
|
+
conversion_rate_config: nil,
|
|
1990
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1991
|
+
dimensional_price_configuration: nil,
|
|
1992
|
+
# An alias for the price.
|
|
1993
|
+
external_price_id: nil,
|
|
1994
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1995
|
+
# applied.
|
|
1996
|
+
fixed_price_quantity: nil,
|
|
1997
|
+
# The property used to group this price on an invoice
|
|
1998
|
+
invoice_grouping_key: nil,
|
|
1999
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
2000
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
2001
|
+
invoicing_cycle_configuration: nil,
|
|
2002
|
+
# The ID of the license type to associate with this price.
|
|
2003
|
+
license_type_id: nil,
|
|
2004
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
2005
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
2006
|
+
# by setting `metadata` to `null`.
|
|
2007
|
+
metadata: nil,
|
|
2008
|
+
# The pricing model type
|
|
2009
|
+
model_type: :cumulative_grouped_allocation
|
|
2010
|
+
)
|
|
2011
|
+
end
|
|
2012
|
+
|
|
2013
|
+
sig do
|
|
2014
|
+
override.returns(
|
|
2015
|
+
{
|
|
2016
|
+
cadence:
|
|
2017
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::OrSymbol,
|
|
2018
|
+
cumulative_grouped_allocation_config:
|
|
2019
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig,
|
|
2020
|
+
currency: String,
|
|
2021
|
+
item_id: String,
|
|
2022
|
+
model_type: Symbol,
|
|
2023
|
+
name: String,
|
|
2024
|
+
billable_metric_id: T.nilable(String),
|
|
2025
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
2026
|
+
billing_cycle_configuration:
|
|
2027
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
2028
|
+
conversion_rate: T.nilable(Float),
|
|
2029
|
+
conversion_rate_config:
|
|
2030
|
+
T.nilable(
|
|
2031
|
+
T.any(
|
|
2032
|
+
Orb::UnitConversionRateConfig,
|
|
2033
|
+
Orb::TieredConversionRateConfig
|
|
2034
|
+
)
|
|
2035
|
+
),
|
|
2036
|
+
dimensional_price_configuration:
|
|
2037
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration),
|
|
2038
|
+
external_price_id: T.nilable(String),
|
|
2039
|
+
fixed_price_quantity: T.nilable(Float),
|
|
2040
|
+
invoice_grouping_key: T.nilable(String),
|
|
2041
|
+
invoicing_cycle_configuration:
|
|
2042
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
2043
|
+
license_type_id: T.nilable(String),
|
|
2044
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)])
|
|
2045
|
+
}
|
|
2046
|
+
)
|
|
2047
|
+
end
|
|
2048
|
+
def to_hash
|
|
2049
|
+
end
|
|
2050
|
+
|
|
2051
|
+
# The cadence to bill for this price on.
|
|
2052
|
+
module Cadence
|
|
2053
|
+
extend Orb::Internal::Type::Enum
|
|
2054
|
+
|
|
2055
|
+
TaggedSymbol =
|
|
2056
|
+
T.type_alias do
|
|
2057
|
+
T.all(
|
|
2058
|
+
Symbol,
|
|
2059
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence
|
|
2060
|
+
)
|
|
2061
|
+
end
|
|
2062
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2063
|
+
|
|
2064
|
+
ANNUAL =
|
|
2065
|
+
T.let(
|
|
2066
|
+
:annual,
|
|
2067
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
2068
|
+
)
|
|
2069
|
+
SEMI_ANNUAL =
|
|
2070
|
+
T.let(
|
|
2071
|
+
:semi_annual,
|
|
2072
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
2073
|
+
)
|
|
2074
|
+
MONTHLY =
|
|
2075
|
+
T.let(
|
|
2076
|
+
:monthly,
|
|
2077
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
2078
|
+
)
|
|
2079
|
+
QUARTERLY =
|
|
2080
|
+
T.let(
|
|
2081
|
+
:quarterly,
|
|
2082
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
2083
|
+
)
|
|
2084
|
+
ONE_TIME =
|
|
2085
|
+
T.let(
|
|
2086
|
+
:one_time,
|
|
2087
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
2088
|
+
)
|
|
2089
|
+
CUSTOM =
|
|
2090
|
+
T.let(
|
|
2091
|
+
:custom,
|
|
2092
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
2093
|
+
)
|
|
2094
|
+
|
|
2095
|
+
sig do
|
|
2096
|
+
override.returns(
|
|
2097
|
+
T::Array[
|
|
2098
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
2099
|
+
]
|
|
2100
|
+
)
|
|
2101
|
+
end
|
|
2102
|
+
def self.values
|
|
2103
|
+
end
|
|
2104
|
+
end
|
|
2105
|
+
|
|
2106
|
+
class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel
|
|
2107
|
+
OrHash =
|
|
2108
|
+
T.type_alias do
|
|
2109
|
+
T.any(
|
|
2110
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig,
|
|
2111
|
+
Orb::Internal::AnyHash
|
|
2112
|
+
)
|
|
2113
|
+
end
|
|
2114
|
+
|
|
2115
|
+
# The overall allocation across all groups
|
|
2116
|
+
sig { returns(String) }
|
|
2117
|
+
attr_accessor :cumulative_allocation
|
|
2118
|
+
|
|
2119
|
+
# The allocation per individual group
|
|
2120
|
+
sig { returns(String) }
|
|
2121
|
+
attr_accessor :group_allocation
|
|
2122
|
+
|
|
2123
|
+
# The event property used to group usage before applying allocations
|
|
2124
|
+
sig { returns(String) }
|
|
2125
|
+
attr_accessor :grouping_key
|
|
2126
|
+
|
|
2127
|
+
# The amount to charge for each unit outside of the allocation
|
|
2128
|
+
sig { returns(String) }
|
|
2129
|
+
attr_accessor :unit_amount
|
|
2130
|
+
|
|
2131
|
+
# Configuration for cumulative_grouped_allocation pricing
|
|
2132
|
+
sig do
|
|
2133
|
+
params(
|
|
2134
|
+
cumulative_allocation: String,
|
|
2135
|
+
group_allocation: String,
|
|
2136
|
+
grouping_key: String,
|
|
2137
|
+
unit_amount: String
|
|
2138
|
+
).returns(T.attached_class)
|
|
2139
|
+
end
|
|
2140
|
+
def self.new(
|
|
2141
|
+
# The overall allocation across all groups
|
|
2142
|
+
cumulative_allocation:,
|
|
2143
|
+
# The allocation per individual group
|
|
2144
|
+
group_allocation:,
|
|
2145
|
+
# The event property used to group usage before applying allocations
|
|
2146
|
+
grouping_key:,
|
|
2147
|
+
# The amount to charge for each unit outside of the allocation
|
|
2148
|
+
unit_amount:
|
|
2149
|
+
)
|
|
2150
|
+
end
|
|
2151
|
+
|
|
2152
|
+
sig do
|
|
2153
|
+
override.returns(
|
|
2154
|
+
{
|
|
2155
|
+
cumulative_allocation: String,
|
|
2156
|
+
group_allocation: String,
|
|
2157
|
+
grouping_key: String,
|
|
2158
|
+
unit_amount: String
|
|
2159
|
+
}
|
|
2160
|
+
)
|
|
2161
|
+
end
|
|
2162
|
+
def to_hash
|
|
2163
|
+
end
|
|
2164
|
+
end
|
|
2165
|
+
end
|
|
2166
|
+
|
|
2167
|
+
class DailyCreditAllowance < Orb::Internal::Type::BaseModel
|
|
2168
|
+
OrHash =
|
|
2169
|
+
T.type_alias do
|
|
2170
|
+
T.any(
|
|
2171
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance,
|
|
891
2172
|
Orb::Internal::AnyHash
|
|
892
2173
|
)
|
|
893
2174
|
end
|
|
@@ -895,7 +2176,7 @@ module Orb
|
|
|
895
2176
|
# The cadence to bill for this price on.
|
|
896
2177
|
sig do
|
|
897
2178
|
returns(
|
|
898
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2179
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol
|
|
899
2180
|
)
|
|
900
2181
|
end
|
|
901
2182
|
attr_accessor :cadence
|
|
@@ -904,21 +2185,21 @@ module Orb
|
|
|
904
2185
|
sig { returns(String) }
|
|
905
2186
|
attr_accessor :currency
|
|
906
2187
|
|
|
907
|
-
# Configuration for
|
|
2188
|
+
# Configuration for daily_credit_allowance pricing
|
|
908
2189
|
sig do
|
|
909
2190
|
returns(
|
|
910
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2191
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig
|
|
911
2192
|
)
|
|
912
2193
|
end
|
|
913
|
-
attr_reader :
|
|
2194
|
+
attr_reader :daily_credit_allowance_config
|
|
914
2195
|
|
|
915
2196
|
sig do
|
|
916
2197
|
params(
|
|
917
|
-
|
|
918
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2198
|
+
daily_credit_allowance_config:
|
|
2199
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash
|
|
919
2200
|
).void
|
|
920
2201
|
end
|
|
921
|
-
attr_writer :
|
|
2202
|
+
attr_writer :daily_credit_allowance_config
|
|
922
2203
|
|
|
923
2204
|
# The id of the item the price will be associated with.
|
|
924
2205
|
sig { returns(String) }
|
|
@@ -1023,10 +2304,10 @@ module Orb
|
|
|
1023
2304
|
sig do
|
|
1024
2305
|
params(
|
|
1025
2306
|
cadence:
|
|
1026
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2307
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol,
|
|
1027
2308
|
currency: String,
|
|
1028
|
-
|
|
1029
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2309
|
+
daily_credit_allowance_config:
|
|
2310
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash,
|
|
1030
2311
|
item_id: String,
|
|
1031
2312
|
name: String,
|
|
1032
2313
|
billable_metric_id: T.nilable(String),
|
|
@@ -1058,8 +2339,8 @@ module Orb
|
|
|
1058
2339
|
cadence:,
|
|
1059
2340
|
# An ISO 4217 currency string for which this price is billed in.
|
|
1060
2341
|
currency:,
|
|
1061
|
-
# Configuration for
|
|
1062
|
-
|
|
2342
|
+
# Configuration for daily_credit_allowance pricing
|
|
2343
|
+
daily_credit_allowance_config:,
|
|
1063
2344
|
# The id of the item the price will be associated with.
|
|
1064
2345
|
item_id:,
|
|
1065
2346
|
# The name of the price.
|
|
@@ -1096,7 +2377,7 @@ module Orb
|
|
|
1096
2377
|
# by setting `metadata` to `null`.
|
|
1097
2378
|
metadata: nil,
|
|
1098
2379
|
# The pricing model type
|
|
1099
|
-
model_type: :
|
|
2380
|
+
model_type: :daily_credit_allowance
|
|
1100
2381
|
)
|
|
1101
2382
|
end
|
|
1102
2383
|
|
|
@@ -1104,10 +2385,10 @@ module Orb
|
|
|
1104
2385
|
override.returns(
|
|
1105
2386
|
{
|
|
1106
2387
|
cadence:
|
|
1107
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2388
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol,
|
|
1108
2389
|
currency: String,
|
|
1109
|
-
|
|
1110
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2390
|
+
daily_credit_allowance_config:
|
|
2391
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig,
|
|
1111
2392
|
item_id: String,
|
|
1112
2393
|
model_type: Symbol,
|
|
1113
2394
|
name: String,
|
|
@@ -1146,7 +2427,7 @@ module Orb
|
|
|
1146
2427
|
T.type_alias do
|
|
1147
2428
|
T.all(
|
|
1148
2429
|
Symbol,
|
|
1149
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2430
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence
|
|
1150
2431
|
)
|
|
1151
2432
|
end
|
|
1152
2433
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -1154,38 +2435,38 @@ module Orb
|
|
|
1154
2435
|
ANNUAL =
|
|
1155
2436
|
T.let(
|
|
1156
2437
|
:annual,
|
|
1157
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2438
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol
|
|
1158
2439
|
)
|
|
1159
2440
|
SEMI_ANNUAL =
|
|
1160
2441
|
T.let(
|
|
1161
2442
|
:semi_annual,
|
|
1162
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2443
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol
|
|
1163
2444
|
)
|
|
1164
2445
|
MONTHLY =
|
|
1165
2446
|
T.let(
|
|
1166
2447
|
:monthly,
|
|
1167
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2448
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol
|
|
1168
2449
|
)
|
|
1169
2450
|
QUARTERLY =
|
|
1170
2451
|
T.let(
|
|
1171
2452
|
:quarterly,
|
|
1172
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2453
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol
|
|
1173
2454
|
)
|
|
1174
2455
|
ONE_TIME =
|
|
1175
2456
|
T.let(
|
|
1176
2457
|
:one_time,
|
|
1177
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2458
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol
|
|
1178
2459
|
)
|
|
1179
2460
|
CUSTOM =
|
|
1180
2461
|
T.let(
|
|
1181
2462
|
:custom,
|
|
1182
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2463
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol
|
|
1183
2464
|
)
|
|
1184
2465
|
|
|
1185
2466
|
sig do
|
|
1186
2467
|
override.returns(
|
|
1187
2468
|
T::Array[
|
|
1188
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2469
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol
|
|
1189
2470
|
]
|
|
1190
2471
|
)
|
|
1191
2472
|
end
|
|
@@ -1193,72 +2474,144 @@ module Orb
|
|
|
1193
2474
|
end
|
|
1194
2475
|
end
|
|
1195
2476
|
|
|
1196
|
-
class
|
|
2477
|
+
class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel
|
|
1197
2478
|
OrHash =
|
|
1198
2479
|
T.type_alias do
|
|
1199
2480
|
T.any(
|
|
1200
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2481
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig,
|
|
1201
2482
|
Orb::Internal::AnyHash
|
|
1202
2483
|
)
|
|
1203
2484
|
end
|
|
1204
2485
|
|
|
1205
|
-
#
|
|
2486
|
+
# Credits granted per day. Lose-it-or-use-it; does not roll over.
|
|
1206
2487
|
sig { returns(String) }
|
|
1207
|
-
attr_accessor :
|
|
2488
|
+
attr_accessor :daily_allowance
|
|
1208
2489
|
|
|
1209
|
-
#
|
|
2490
|
+
# Default per-unit credit rate for any usage not bucketed into a specified
|
|
2491
|
+
# matrix_value
|
|
1210
2492
|
sig { returns(String) }
|
|
1211
|
-
attr_accessor :
|
|
2493
|
+
attr_accessor :default_unit_amount
|
|
1212
2494
|
|
|
1213
|
-
#
|
|
1214
|
-
sig { returns(String) }
|
|
1215
|
-
attr_accessor :
|
|
2495
|
+
# One or two event property values to evaluate matrix groups by
|
|
2496
|
+
sig { returns(T::Array[T.nilable(String)]) }
|
|
2497
|
+
attr_accessor :dimensions
|
|
1216
2498
|
|
|
1217
|
-
#
|
|
2499
|
+
# Event property whose value identifies the day bucket the event belongs to (e.g.
|
|
2500
|
+
# 'event_day' set to an ISO date string in the customer's timezone). The allowance
|
|
2501
|
+
# resets per distinct value of this property.
|
|
1218
2502
|
sig { returns(String) }
|
|
1219
|
-
attr_accessor :
|
|
2503
|
+
attr_accessor :event_day_property
|
|
1220
2504
|
|
|
1221
|
-
#
|
|
2505
|
+
# Per-dimension credit rates
|
|
2506
|
+
sig do
|
|
2507
|
+
returns(
|
|
2508
|
+
T::Array[
|
|
2509
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue
|
|
2510
|
+
]
|
|
2511
|
+
)
|
|
2512
|
+
end
|
|
2513
|
+
attr_accessor :matrix_values
|
|
2514
|
+
|
|
2515
|
+
# Configuration for daily_credit_allowance pricing
|
|
1222
2516
|
sig do
|
|
1223
2517
|
params(
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
2518
|
+
daily_allowance: String,
|
|
2519
|
+
default_unit_amount: String,
|
|
2520
|
+
dimensions: T::Array[T.nilable(String)],
|
|
2521
|
+
event_day_property: String,
|
|
2522
|
+
matrix_values:
|
|
2523
|
+
T::Array[
|
|
2524
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash
|
|
2525
|
+
]
|
|
1228
2526
|
).returns(T.attached_class)
|
|
1229
2527
|
end
|
|
1230
2528
|
def self.new(
|
|
1231
|
-
#
|
|
1232
|
-
|
|
1233
|
-
#
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
2529
|
+
# Credits granted per day. Lose-it-or-use-it; does not roll over.
|
|
2530
|
+
daily_allowance:,
|
|
2531
|
+
# Default per-unit credit rate for any usage not bucketed into a specified
|
|
2532
|
+
# matrix_value
|
|
2533
|
+
default_unit_amount:,
|
|
2534
|
+
# One or two event property values to evaluate matrix groups by
|
|
2535
|
+
dimensions:,
|
|
2536
|
+
# Event property whose value identifies the day bucket the event belongs to (e.g.
|
|
2537
|
+
# 'event_day' set to an ISO date string in the customer's timezone). The allowance
|
|
2538
|
+
# resets per distinct value of this property.
|
|
2539
|
+
event_day_property:,
|
|
2540
|
+
# Per-dimension credit rates
|
|
2541
|
+
matrix_values:
|
|
1239
2542
|
)
|
|
1240
2543
|
end
|
|
1241
2544
|
|
|
1242
2545
|
sig do
|
|
1243
2546
|
override.returns(
|
|
1244
2547
|
{
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
2548
|
+
daily_allowance: String,
|
|
2549
|
+
default_unit_amount: String,
|
|
2550
|
+
dimensions: T::Array[T.nilable(String)],
|
|
2551
|
+
event_day_property: String,
|
|
2552
|
+
matrix_values:
|
|
2553
|
+
T::Array[
|
|
2554
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue
|
|
2555
|
+
]
|
|
1249
2556
|
}
|
|
1250
2557
|
)
|
|
1251
2558
|
end
|
|
1252
2559
|
def to_hash
|
|
1253
2560
|
end
|
|
2561
|
+
|
|
2562
|
+
class MatrixValue < Orb::Internal::Type::BaseModel
|
|
2563
|
+
OrHash =
|
|
2564
|
+
T.type_alias do
|
|
2565
|
+
T.any(
|
|
2566
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue,
|
|
2567
|
+
Orb::Internal::AnyHash
|
|
2568
|
+
)
|
|
2569
|
+
end
|
|
2570
|
+
|
|
2571
|
+
# One or two matrix keys to filter usage to this value by. For example, ["model"]
|
|
2572
|
+
# could be used to apply a different credit rate to each AI model.
|
|
2573
|
+
sig { returns(T::Array[T.nilable(String)]) }
|
|
2574
|
+
attr_accessor :dimension_values
|
|
2575
|
+
|
|
2576
|
+
# Credits charged per unit of usage matching the specified dimension_values
|
|
2577
|
+
sig { returns(String) }
|
|
2578
|
+
attr_accessor :unit_amount
|
|
2579
|
+
|
|
2580
|
+
# Per-dimension credit price for the daily credit allowance model.
|
|
2581
|
+
sig do
|
|
2582
|
+
params(
|
|
2583
|
+
dimension_values: T::Array[T.nilable(String)],
|
|
2584
|
+
unit_amount: String
|
|
2585
|
+
).returns(T.attached_class)
|
|
2586
|
+
end
|
|
2587
|
+
def self.new(
|
|
2588
|
+
# One or two matrix keys to filter usage to this value by. For example, ["model"]
|
|
2589
|
+
# could be used to apply a different credit rate to each AI model.
|
|
2590
|
+
dimension_values:,
|
|
2591
|
+
# Credits charged per unit of usage matching the specified dimension_values
|
|
2592
|
+
unit_amount:
|
|
2593
|
+
)
|
|
2594
|
+
end
|
|
2595
|
+
|
|
2596
|
+
sig do
|
|
2597
|
+
override.returns(
|
|
2598
|
+
{
|
|
2599
|
+
dimension_values: T::Array[T.nilable(String)],
|
|
2600
|
+
unit_amount: String
|
|
2601
|
+
}
|
|
2602
|
+
)
|
|
2603
|
+
end
|
|
2604
|
+
def to_hash
|
|
2605
|
+
end
|
|
2606
|
+
end
|
|
1254
2607
|
end
|
|
1255
2608
|
end
|
|
1256
2609
|
|
|
1257
|
-
class
|
|
2610
|
+
class MeteredAllowance < Orb::Internal::Type::BaseModel
|
|
1258
2611
|
OrHash =
|
|
1259
2612
|
T.type_alias do
|
|
1260
2613
|
T.any(
|
|
1261
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2614
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance,
|
|
1262
2615
|
Orb::Internal::AnyHash
|
|
1263
2616
|
)
|
|
1264
2617
|
end
|
|
@@ -1266,34 +2619,34 @@ module Orb
|
|
|
1266
2619
|
# The cadence to bill for this price on.
|
|
1267
2620
|
sig do
|
|
1268
2621
|
returns(
|
|
1269
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2622
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol
|
|
1270
2623
|
)
|
|
1271
2624
|
end
|
|
1272
2625
|
attr_accessor :cadence
|
|
1273
2626
|
|
|
1274
|
-
#
|
|
2627
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
2628
|
+
sig { returns(String) }
|
|
2629
|
+
attr_accessor :currency
|
|
2630
|
+
|
|
2631
|
+
# The id of the item the price will be associated with.
|
|
2632
|
+
sig { returns(String) }
|
|
2633
|
+
attr_accessor :item_id
|
|
2634
|
+
|
|
2635
|
+
# Configuration for metered_allowance pricing
|
|
1275
2636
|
sig do
|
|
1276
2637
|
returns(
|
|
1277
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2638
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig
|
|
1278
2639
|
)
|
|
1279
2640
|
end
|
|
1280
|
-
attr_reader :
|
|
2641
|
+
attr_reader :metered_allowance_config
|
|
1281
2642
|
|
|
1282
2643
|
sig do
|
|
1283
2644
|
params(
|
|
1284
|
-
|
|
1285
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2645
|
+
metered_allowance_config:
|
|
2646
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash
|
|
1286
2647
|
).void
|
|
1287
2648
|
end
|
|
1288
|
-
attr_writer :
|
|
1289
|
-
|
|
1290
|
-
# An ISO 4217 currency string for which this price is billed in.
|
|
1291
|
-
sig { returns(String) }
|
|
1292
|
-
attr_accessor :currency
|
|
1293
|
-
|
|
1294
|
-
# The id of the item the price will be associated with.
|
|
1295
|
-
sig { returns(String) }
|
|
1296
|
-
attr_accessor :item_id
|
|
2649
|
+
attr_writer :metered_allowance_config
|
|
1297
2650
|
|
|
1298
2651
|
# The pricing model type
|
|
1299
2652
|
sig { returns(Symbol) }
|
|
@@ -1394,11 +2747,11 @@ module Orb
|
|
|
1394
2747
|
sig do
|
|
1395
2748
|
params(
|
|
1396
2749
|
cadence:
|
|
1397
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
1398
|
-
cumulative_grouped_allocation_config:
|
|
1399
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash,
|
|
2750
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol,
|
|
1400
2751
|
currency: String,
|
|
1401
2752
|
item_id: String,
|
|
2753
|
+
metered_allowance_config:
|
|
2754
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash,
|
|
1402
2755
|
name: String,
|
|
1403
2756
|
billable_metric_id: T.nilable(String),
|
|
1404
2757
|
billed_in_advance: T.nilable(T::Boolean),
|
|
@@ -1427,12 +2780,12 @@ module Orb
|
|
|
1427
2780
|
def self.new(
|
|
1428
2781
|
# The cadence to bill for this price on.
|
|
1429
2782
|
cadence:,
|
|
1430
|
-
# Configuration for cumulative_grouped_allocation pricing
|
|
1431
|
-
cumulative_grouped_allocation_config:,
|
|
1432
2783
|
# An ISO 4217 currency string for which this price is billed in.
|
|
1433
2784
|
currency:,
|
|
1434
2785
|
# The id of the item the price will be associated with.
|
|
1435
2786
|
item_id:,
|
|
2787
|
+
# Configuration for metered_allowance pricing
|
|
2788
|
+
metered_allowance_config:,
|
|
1436
2789
|
# The name of the price.
|
|
1437
2790
|
name:,
|
|
1438
2791
|
# The id of the billable metric for the price. Only needed if the price is
|
|
@@ -1467,7 +2820,7 @@ module Orb
|
|
|
1467
2820
|
# by setting `metadata` to `null`.
|
|
1468
2821
|
metadata: nil,
|
|
1469
2822
|
# The pricing model type
|
|
1470
|
-
model_type: :
|
|
2823
|
+
model_type: :metered_allowance
|
|
1471
2824
|
)
|
|
1472
2825
|
end
|
|
1473
2826
|
|
|
@@ -1475,11 +2828,11 @@ module Orb
|
|
|
1475
2828
|
override.returns(
|
|
1476
2829
|
{
|
|
1477
2830
|
cadence:
|
|
1478
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
1479
|
-
cumulative_grouped_allocation_config:
|
|
1480
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig,
|
|
2831
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol,
|
|
1481
2832
|
currency: String,
|
|
1482
2833
|
item_id: String,
|
|
2834
|
+
metered_allowance_config:
|
|
2835
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig,
|
|
1483
2836
|
model_type: Symbol,
|
|
1484
2837
|
name: String,
|
|
1485
2838
|
billable_metric_id: T.nilable(String),
|
|
@@ -1517,7 +2870,7 @@ module Orb
|
|
|
1517
2870
|
T.type_alias do
|
|
1518
2871
|
T.all(
|
|
1519
2872
|
Symbol,
|
|
1520
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2873
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence
|
|
1521
2874
|
)
|
|
1522
2875
|
end
|
|
1523
2876
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -1525,38 +2878,38 @@ module Orb
|
|
|
1525
2878
|
ANNUAL =
|
|
1526
2879
|
T.let(
|
|
1527
2880
|
:annual,
|
|
1528
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2881
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol
|
|
1529
2882
|
)
|
|
1530
2883
|
SEMI_ANNUAL =
|
|
1531
2884
|
T.let(
|
|
1532
2885
|
:semi_annual,
|
|
1533
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2886
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol
|
|
1534
2887
|
)
|
|
1535
2888
|
MONTHLY =
|
|
1536
2889
|
T.let(
|
|
1537
2890
|
:monthly,
|
|
1538
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2891
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol
|
|
1539
2892
|
)
|
|
1540
2893
|
QUARTERLY =
|
|
1541
2894
|
T.let(
|
|
1542
2895
|
:quarterly,
|
|
1543
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2896
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol
|
|
1544
2897
|
)
|
|
1545
2898
|
ONE_TIME =
|
|
1546
2899
|
T.let(
|
|
1547
2900
|
:one_time,
|
|
1548
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2901
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol
|
|
1549
2902
|
)
|
|
1550
2903
|
CUSTOM =
|
|
1551
2904
|
T.let(
|
|
1552
2905
|
:custom,
|
|
1553
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2906
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol
|
|
1554
2907
|
)
|
|
1555
2908
|
|
|
1556
2909
|
sig do
|
|
1557
2910
|
override.returns(
|
|
1558
2911
|
T::Array[
|
|
1559
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2912
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol
|
|
1560
2913
|
]
|
|
1561
2914
|
)
|
|
1562
2915
|
end
|
|
@@ -1564,59 +2917,91 @@ module Orb
|
|
|
1564
2917
|
end
|
|
1565
2918
|
end
|
|
1566
2919
|
|
|
1567
|
-
class
|
|
2920
|
+
class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel
|
|
1568
2921
|
OrHash =
|
|
1569
2922
|
T.type_alias do
|
|
1570
2923
|
T.any(
|
|
1571
|
-
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::
|
|
2924
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig,
|
|
1572
2925
|
Orb::Internal::AnyHash
|
|
1573
2926
|
)
|
|
1574
2927
|
end
|
|
1575
2928
|
|
|
1576
|
-
# The
|
|
2929
|
+
# The grouping_key value whose summed quantity represents the allowance for this
|
|
2930
|
+
# period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
|
|
2931
|
+
# — credit can never exceed actual usage.
|
|
1577
2932
|
sig { returns(String) }
|
|
1578
|
-
attr_accessor :
|
|
2933
|
+
attr_accessor :allowance_grouping_value
|
|
1579
2934
|
|
|
1580
|
-
# The
|
|
2935
|
+
# The grouping_key value whose summed quantity represents consumption (e.g.
|
|
2936
|
+
# 'download'). Charged at unit_amount.
|
|
1581
2937
|
sig { returns(String) }
|
|
1582
|
-
attr_accessor :
|
|
2938
|
+
attr_accessor :consumption_grouping_value
|
|
1583
2939
|
|
|
1584
|
-
#
|
|
2940
|
+
# Event property used to partition the metric into consumption and allowance
|
|
2941
|
+
# quantities (e.g. 'event_name'). The metric is queried with this key and the two
|
|
2942
|
+
# values below select which partition is which.
|
|
1585
2943
|
sig { returns(String) }
|
|
1586
2944
|
attr_accessor :grouping_key
|
|
1587
2945
|
|
|
1588
|
-
#
|
|
2946
|
+
# Per-unit price applied to gross consumption and to the allowance credit.
|
|
1589
2947
|
sig { returns(String) }
|
|
1590
2948
|
attr_accessor :unit_amount
|
|
1591
2949
|
|
|
1592
|
-
#
|
|
2950
|
+
# Sub-line label for the credit row (e.g. 'Up to 3x free egress').
|
|
2951
|
+
sig { returns(T.nilable(String)) }
|
|
2952
|
+
attr_reader :allowance_display_name
|
|
2953
|
+
|
|
2954
|
+
sig { params(allowance_display_name: String).void }
|
|
2955
|
+
attr_writer :allowance_display_name
|
|
2956
|
+
|
|
2957
|
+
# Sub-line label for the gross consumption row (e.g. 'bytes gotten').
|
|
2958
|
+
sig { returns(T.nilable(String)) }
|
|
2959
|
+
attr_reader :consumption_display_name
|
|
2960
|
+
|
|
2961
|
+
sig { params(consumption_display_name: String).void }
|
|
2962
|
+
attr_writer :consumption_display_name
|
|
2963
|
+
|
|
2964
|
+
# Configuration for metered_allowance pricing
|
|
1593
2965
|
sig do
|
|
1594
2966
|
params(
|
|
1595
|
-
|
|
1596
|
-
|
|
2967
|
+
allowance_grouping_value: String,
|
|
2968
|
+
consumption_grouping_value: String,
|
|
1597
2969
|
grouping_key: String,
|
|
1598
|
-
unit_amount: String
|
|
2970
|
+
unit_amount: String,
|
|
2971
|
+
allowance_display_name: String,
|
|
2972
|
+
consumption_display_name: String
|
|
1599
2973
|
).returns(T.attached_class)
|
|
1600
2974
|
end
|
|
1601
2975
|
def self.new(
|
|
1602
|
-
# The
|
|
1603
|
-
|
|
1604
|
-
#
|
|
1605
|
-
|
|
1606
|
-
# The
|
|
2976
|
+
# The grouping_key value whose summed quantity represents the allowance for this
|
|
2977
|
+
# period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
|
|
2978
|
+
# — credit can never exceed actual usage.
|
|
2979
|
+
allowance_grouping_value:,
|
|
2980
|
+
# The grouping_key value whose summed quantity represents consumption (e.g.
|
|
2981
|
+
# 'download'). Charged at unit_amount.
|
|
2982
|
+
consumption_grouping_value:,
|
|
2983
|
+
# Event property used to partition the metric into consumption and allowance
|
|
2984
|
+
# quantities (e.g. 'event_name'). The metric is queried with this key and the two
|
|
2985
|
+
# values below select which partition is which.
|
|
1607
2986
|
grouping_key:,
|
|
1608
|
-
#
|
|
1609
|
-
unit_amount
|
|
2987
|
+
# Per-unit price applied to gross consumption and to the allowance credit.
|
|
2988
|
+
unit_amount:,
|
|
2989
|
+
# Sub-line label for the credit row (e.g. 'Up to 3x free egress').
|
|
2990
|
+
allowance_display_name: nil,
|
|
2991
|
+
# Sub-line label for the gross consumption row (e.g. 'bytes gotten').
|
|
2992
|
+
consumption_display_name: nil
|
|
1610
2993
|
)
|
|
1611
2994
|
end
|
|
1612
2995
|
|
|
1613
2996
|
sig do
|
|
1614
2997
|
override.returns(
|
|
1615
2998
|
{
|
|
1616
|
-
|
|
1617
|
-
|
|
2999
|
+
allowance_grouping_value: String,
|
|
3000
|
+
consumption_grouping_value: String,
|
|
1618
3001
|
grouping_key: String,
|
|
1619
|
-
unit_amount: String
|
|
3002
|
+
unit_amount: String,
|
|
3003
|
+
allowance_display_name: String,
|
|
3004
|
+
consumption_display_name: String
|
|
1620
3005
|
}
|
|
1621
3006
|
)
|
|
1622
3007
|
end
|
|
@@ -1944,19 +3329,60 @@ module Orb
|
|
|
1944
3329
|
)
|
|
1945
3330
|
end
|
|
1946
3331
|
|
|
1947
|
-
#
|
|
3332
|
+
# Fraction of the component subtotals to charge (0 < percent <= 1).
|
|
1948
3333
|
sig { returns(Float) }
|
|
1949
3334
|
attr_accessor :percent
|
|
1950
3335
|
|
|
3336
|
+
# Maximum amount to charge. If unset, the fee has no upper bound.
|
|
3337
|
+
sig { returns(T.nilable(String)) }
|
|
3338
|
+
attr_accessor :maximum_amount
|
|
3339
|
+
|
|
3340
|
+
# Minimum amount to charge. If unset, the fee is bounded below by 0.
|
|
3341
|
+
sig { returns(T.nilable(String)) }
|
|
3342
|
+
attr_accessor :minimum_amount
|
|
3343
|
+
|
|
3344
|
+
# If true, the minimum_amount is prorated based on the service period. The
|
|
3345
|
+
# maximum_amount is an absolute cap (never prorated), and the percent applied to
|
|
3346
|
+
# upstream subtotals is never prorated either.
|
|
3347
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
3348
|
+
attr_reader :prorated
|
|
3349
|
+
|
|
3350
|
+
sig { params(prorated: T::Boolean).void }
|
|
3351
|
+
attr_writer :prorated
|
|
3352
|
+
|
|
1951
3353
|
# Configuration for percent pricing
|
|
1952
|
-
sig
|
|
3354
|
+
sig do
|
|
3355
|
+
params(
|
|
3356
|
+
percent: Float,
|
|
3357
|
+
maximum_amount: T.nilable(String),
|
|
3358
|
+
minimum_amount: T.nilable(String),
|
|
3359
|
+
prorated: T::Boolean
|
|
3360
|
+
).returns(T.attached_class)
|
|
3361
|
+
end
|
|
1953
3362
|
def self.new(
|
|
1954
|
-
#
|
|
1955
|
-
percent
|
|
3363
|
+
# Fraction of the component subtotals to charge (0 < percent <= 1).
|
|
3364
|
+
percent:,
|
|
3365
|
+
# Maximum amount to charge. If unset, the fee has no upper bound.
|
|
3366
|
+
maximum_amount: nil,
|
|
3367
|
+
# Minimum amount to charge. If unset, the fee is bounded below by 0.
|
|
3368
|
+
minimum_amount: nil,
|
|
3369
|
+
# If true, the minimum_amount is prorated based on the service period. The
|
|
3370
|
+
# maximum_amount is an absolute cap (never prorated), and the percent applied to
|
|
3371
|
+
# upstream subtotals is never prorated either.
|
|
3372
|
+
prorated: nil
|
|
1956
3373
|
)
|
|
1957
3374
|
end
|
|
1958
3375
|
|
|
1959
|
-
sig
|
|
3376
|
+
sig do
|
|
3377
|
+
override.returns(
|
|
3378
|
+
{
|
|
3379
|
+
percent: Float,
|
|
3380
|
+
maximum_amount: T.nilable(String),
|
|
3381
|
+
minimum_amount: T.nilable(String),
|
|
3382
|
+
prorated: T::Boolean
|
|
3383
|
+
}
|
|
3384
|
+
)
|
|
3385
|
+
end
|
|
1960
3386
|
def to_hash
|
|
1961
3387
|
end
|
|
1962
3388
|
end
|