orb-billing 1.13.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 +55 -0
- data/README.md +1 -1
- data/lib/orb/client.rb +21 -0
- data/lib/orb/internal/transport/base_client.rb +5 -0
- data/lib/orb/internal/type/union.rb +13 -27
- data/lib/orb/internal/util.rb +22 -7
- 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 +114 -1
- data/lib/orb/models/alert_create_for_customer_params.rb +8 -1
- data/lib/orb/models/alert_create_for_external_customer_params.rb +8 -1
- data/lib/orb/models/alert_create_for_subscription_params.rb +142 -1
- data/lib/orb/models/alert_disable_params.rb +8 -1
- data/lib/orb/models/alert_enable_params.rb +8 -1
- data/lib/orb/models/alert_retrieve_params.rb +7 -1
- data/lib/orb/models/alert_update_params.rb +120 -1
- data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +3296 -631
- data/lib/orb/models/beta/external_plan_id_fetch_plan_version_params.rb +7 -1
- data/lib/orb/models/beta/external_plan_id_set_default_plan_version_params.rb +8 -1
- data/lib/orb/models/beta_create_plan_version_params.rb +3263 -622
- data/lib/orb/models/beta_fetch_plan_version_params.rb +7 -1
- data/lib/orb/models/beta_set_default_plan_version_params.rb +8 -1
- data/lib/orb/models/changed_subscription_resources.rb +200 -10
- data/lib/orb/models/conversion_rate_config.rb +18 -0
- data/lib/orb/models/coupon_archive_params.rb +7 -1
- data/lib/orb/models/coupon_fetch_params.rb +7 -1
- data/lib/orb/models/coupons/subscription_list_params.rb +8 -1
- data/lib/orb/models/credit_block_delete_params.rb +7 -1
- data/lib/orb/models/credit_block_list_invoices_params.rb +7 -1
- data/lib/orb/models/credit_block_list_invoices_response.rb +155 -1
- data/lib/orb/models/credit_block_retrieve_params.rb +7 -1
- data/lib/orb/models/credit_block_retrieve_response.rb +150 -1
- data/lib/orb/models/credit_note_fetch_params.rb +7 -1
- data/lib/orb/models/customer.rb +122 -3
- data/lib/orb/models/customer_create_params.rb +17 -1
- data/lib/orb/models/customer_delete_params.rb +7 -1
- data/lib/orb/models/customer_fetch_by_external_id_params.rb +7 -1
- data/lib/orb/models/customer_fetch_params.rb +7 -1
- data/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rb +7 -1
- data/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rb +7 -1
- data/lib/orb/models/customer_tax_id.rb +15 -1
- data/lib/orb/models/customer_update_by_external_id_params.rb +39 -5
- data/lib/orb/models/customer_update_params.rb +39 -5
- data/lib/orb/models/customers/balance_transaction_create_params.rb +8 -1
- data/lib/orb/models/customers/balance_transaction_list_params.rb +8 -1
- data/lib/orb/models/customers/cost_list_by_external_id_params.rb +8 -1
- data/lib/orb/models/customers/cost_list_params.rb +8 -1
- data/lib/orb/models/customers/credit_list_by_external_id_params.rb +8 -1
- data/lib/orb/models/customers/credit_list_by_external_id_response.rb +155 -1
- data/lib/orb/models/customers/credit_list_params.rb +8 -1
- data/lib/orb/models/customers/credit_list_response.rb +152 -1
- data/lib/orb/models/customers/credits/decrement_ledger_entry.rb +5 -1
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +582 -315
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +580 -313
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +8 -1
- data/lib/orb/models/customers/credits/ledger_list_params.rb +8 -1
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +8 -1
- data/lib/orb/models/customers/credits/top_up_create_params.rb +8 -1
- data/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rb +7 -1
- data/lib/orb/models/customers/credits/top_up_delete_params.rb +7 -1
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +8 -1
- data/lib/orb/models/customers/credits/top_up_list_params.rb +8 -1
- data/lib/orb/models/dimensional_price_group.rb +1 -1
- data/lib/orb/models/dimensional_price_group_retrieve_params.rb +7 -1
- data/lib/orb/models/dimensional_price_group_update_params.rb +8 -1
- data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rb +7 -1
- data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rb +8 -1
- data/lib/orb/models/discount.rb +145 -1
- data/lib/orb/models/event_deprecate_params.rb +7 -1
- data/lib/orb/models/event_ingest_params.rb +5 -2
- data/lib/orb/models/event_update_params.rb +8 -1
- data/lib/orb/models/events/backfill_close_params.rb +7 -1
- data/lib/orb/models/events/backfill_fetch_params.rb +7 -1
- data/lib/orb/models/events/backfill_revert_params.rb +7 -1
- data/lib/orb/models/invoice.rb +198 -10
- data/lib/orb/models/invoice_create_params.rb +6 -5
- data/lib/orb/models/invoice_delete_line_item_params.rb +7 -1
- data/lib/orb/models/invoice_fetch_params.rb +7 -1
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +200 -10
- data/lib/orb/models/invoice_issue_params.rb +8 -1
- data/lib/orb/models/invoice_issue_summary_params.rb +8 -1
- 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/invoice_mark_paid_params.rb +8 -1
- data/lib/orb/models/invoice_pay_params.rb +16 -1
- data/lib/orb/models/invoice_update_params.rb +8 -1
- data/lib/orb/models/invoice_void_params.rb +7 -1
- data/lib/orb/models/item_archive_params.rb +7 -1
- data/lib/orb/models/item_fetch_params.rb +7 -1
- data/lib/orb/models/item_update_params.rb +8 -1
- data/lib/orb/models/license_deactivate_params.rb +8 -1
- data/lib/orb/models/license_retrieve_by_external_id_params.rb +8 -1
- data/lib/orb/models/license_retrieve_params.rb +7 -1
- data/lib/orb/models/license_type_retrieve_params.rb +7 -1
- data/lib/orb/models/licenses/external_license_get_usage_params.rb +11 -4
- data/lib/orb/models/licenses/usage_get_all_usage_params.rb +3 -3
- data/lib/orb/models/licenses/usage_get_usage_params.rb +11 -4
- data/lib/orb/models/metric_fetch_params.rb +7 -1
- data/lib/orb/models/metric_update_params.rb +8 -1
- 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 +1478 -158
- data/lib/orb/models/plan_fetch_params.rb +7 -1
- data/lib/orb/models/plan_update_params.rb +16 -1
- data/lib/orb/models/plan_version.rb +186 -5
- data/lib/orb/models/plans/external_plan_id_fetch_params.rb +7 -1
- data/lib/orb/models/plans/external_plan_id_update_params.rb +16 -1
- data/lib/orb/models/plans/migration_cancel_params.rb +7 -1
- data/lib/orb/models/plans/migration_cancel_response.rb +22 -4
- data/lib/orb/models/plans/migration_list_params.rb +8 -1
- data/lib/orb/models/plans/migration_list_response.rb +22 -4
- data/lib/orb/models/plans/migration_retrieve_params.rb +7 -1
- data/lib/orb/models/plans/migration_retrieve_response.rb +22 -4
- data/lib/orb/models/price.rb +2807 -1244
- data/lib/orb/models/price_create_params.rb +1800 -1355
- data/lib/orb/models/price_evaluate_multiple_params.rb +889 -54
- data/lib/orb/models/price_evaluate_params.rb +8 -1
- data/lib/orb/models/price_evaluate_preview_events_params.rb +881 -46
- data/lib/orb/models/price_fetch_params.rb +7 -1
- data/lib/orb/models/price_interval.rb +2 -2
- data/lib/orb/models/price_update_params.rb +8 -1
- data/lib/orb/models/prices/external_price_id_fetch_params.rb +7 -1
- data/lib/orb/models/prices/external_price_id_update_params.rb +8 -1
- data/lib/orb/models/subscription.rb +168 -4
- data/lib/orb/models/subscription_cancel_params.rb +8 -1
- data/lib/orb/models/subscription_change_apply_params.rb +8 -1
- data/lib/orb/models/subscription_change_cancel_params.rb +7 -1
- data/lib/orb/models/subscription_change_retrieve_params.rb +7 -1
- data/lib/orb/models/subscription_create_params.rb +2818 -674
- data/lib/orb/models/subscription_fetch_costs_params.rb +8 -1
- data/lib/orb/models/subscription_fetch_params.rb +7 -1
- data/lib/orb/models/subscription_fetch_schedule_params.rb +8 -1
- data/lib/orb/models/subscription_fetch_usage_params.rb +8 -1
- data/lib/orb/models/subscription_price_intervals_params.rb +1103 -55
- data/lib/orb/models/subscription_redeem_coupon_params.rb +8 -1
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +2839 -685
- data/lib/orb/models/subscription_trigger_phase_params.rb +8 -1
- data/lib/orb/models/subscription_unschedule_cancellation_params.rb +7 -1
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rb +8 -1
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb +7 -1
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +8 -1
- data/lib/orb/models/subscription_update_params.rb +19 -1
- data/lib/orb/models/subscription_update_trial_params.rb +8 -1
- data/lib/orb/models.rb +2 -0
- data/lib/orb/resources/alerts.rb +20 -2
- data/lib/orb/resources/coupons.rb +1 -2
- data/lib/orb/resources/credit_blocks.rb +11 -8
- data/lib/orb/resources/customers/credits/ledger.rb +40 -81
- data/lib/orb/resources/customers.rb +12 -7
- data/lib/orb/resources/events/backfills.rb +3 -4
- data/lib/orb/resources/events.rb +7 -34
- data/lib/orb/resources/invoices.rb +18 -7
- 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 +13 -104
- data/lib/orb/resources/subscriptions.rb +24 -7
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +1 -0
- data/rbi/orb/client.rbi +6 -0
- data/rbi/orb/internal/util.rbi +8 -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 +182 -3
- data/rbi/orb/models/alert_create_for_customer_params.rbi +6 -0
- data/rbi/orb/models/alert_create_for_external_customer_params.rbi +6 -0
- data/rbi/orb/models/alert_create_for_subscription_params.rbi +285 -0
- data/rbi/orb/models/alert_disable_params.rbi +6 -0
- data/rbi/orb/models/alert_enable_params.rbi +6 -0
- data/rbi/orb/models/alert_retrieve_params.rbi +13 -5
- data/rbi/orb/models/alert_update_params.rbi +214 -0
- data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +5873 -1161
- data/rbi/orb/models/beta/external_plan_id_fetch_plan_version_params.rbi +10 -2
- data/rbi/orb/models/beta/external_plan_id_set_default_plan_version_params.rbi +10 -1
- data/rbi/orb/models/beta_create_plan_version_params.rbi +5877 -1165
- data/rbi/orb/models/beta_fetch_plan_version_params.rbi +10 -2
- data/rbi/orb/models/beta_set_default_plan_version_params.rbi +10 -1
- data/rbi/orb/models/changed_subscription_resources.rbi +360 -5
- data/rbi/orb/models/conversion_rate_config.rbi +18 -0
- data/rbi/orb/models/coupon_archive_params.rbi +13 -5
- data/rbi/orb/models/coupon_fetch_params.rbi +13 -5
- data/rbi/orb/models/coupons/subscription_list_params.rbi +6 -0
- data/rbi/orb/models/credit_block_delete_params.rbi +13 -5
- data/rbi/orb/models/credit_block_list_invoices_params.rbi +13 -5
- data/rbi/orb/models/credit_block_list_invoices_response.rbi +346 -3
- data/rbi/orb/models/credit_block_retrieve_params.rbi +13 -5
- data/rbi/orb/models/credit_block_retrieve_response.rbi +344 -3
- data/rbi/orb/models/credit_note_fetch_params.rbi +13 -5
- data/rbi/orb/models/customer.rbi +202 -0
- data/rbi/orb/models/customer_create_params.rbi +27 -0
- data/rbi/orb/models/customer_delete_params.rbi +13 -5
- data/rbi/orb/models/customer_fetch_by_external_id_params.rbi +13 -5
- data/rbi/orb/models/customer_fetch_params.rbi +13 -5
- data/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +13 -5
- data/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +13 -5
- data/rbi/orb/models/customer_tax_id.rbi +15 -1
- data/rbi/orb/models/customer_update_by_external_id_params.rbi +51 -4
- data/rbi/orb/models/customer_update_params.rbi +51 -4
- data/rbi/orb/models/customers/balance_transaction_create_params.rbi +6 -0
- data/rbi/orb/models/customers/balance_transaction_list_params.rbi +6 -0
- data/rbi/orb/models/customers/cost_list_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/customers/cost_list_params.rbi +6 -0
- data/rbi/orb/models/customers/credit_list_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +346 -3
- data/rbi/orb/models/customers/credit_list_params.rbi +6 -0
- data/rbi/orb/models/customers/credit_list_response.rbi +347 -3
- data/rbi/orb/models/customers/credits/decrement_ledger_entry.rbi +4 -0
- data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +861 -478
- data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +861 -478
- data/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/ledger_list_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/top_up_create_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +6 -1
- data/rbi/orb/models/customers/credits/top_up_delete_params.rbi +10 -2
- data/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/top_up_list_params.rbi +6 -0
- data/rbi/orb/models/dimensional_price_group.rbi +1 -1
- data/rbi/orb/models/dimensional_price_group_retrieve_params.rbi +16 -5
- data/rbi/orb/models/dimensional_price_group_update_params.rbi +6 -0
- data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +16 -5
- data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbi +6 -0
- data/rbi/orb/models/discount.rbi +269 -1
- data/rbi/orb/models/event_deprecate_params.rbi +13 -5
- data/rbi/orb/models/event_ingest_params.rbi +4 -2
- data/rbi/orb/models/event_update_params.rbi +6 -0
- data/rbi/orb/models/events/backfill_close_params.rbi +13 -5
- data/rbi/orb/models/events/backfill_fetch_params.rbi +13 -5
- data/rbi/orb/models/events/backfill_revert_params.rbi +13 -5
- data/rbi/orb/models/invoice.rbi +360 -5
- data/rbi/orb/models/invoice_create_params.rbi +12 -7
- data/rbi/orb/models/invoice_delete_line_item_params.rbi +10 -2
- data/rbi/orb/models/invoice_fetch_params.rbi +13 -5
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +360 -5
- data/rbi/orb/models/invoice_issue_params.rbi +10 -1
- data/rbi/orb/models/invoice_issue_summary_params.rbi +10 -1
- 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/invoice_mark_paid_params.rbi +6 -0
- data/rbi/orb/models/invoice_pay_params.rbi +27 -5
- data/rbi/orb/models/invoice_update_params.rbi +6 -0
- data/rbi/orb/models/invoice_void_params.rbi +13 -5
- data/rbi/orb/models/item_archive_params.rbi +13 -5
- data/rbi/orb/models/item_fetch_params.rbi +13 -5
- data/rbi/orb/models/item_update_params.rbi +6 -0
- data/rbi/orb/models/license_deactivate_params.rbi +10 -1
- data/rbi/orb/models/license_retrieve_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/license_retrieve_params.rbi +13 -5
- data/rbi/orb/models/license_type_retrieve_params.rbi +13 -5
- data/rbi/orb/models/licenses/external_license_get_usage_params.rbi +9 -3
- data/rbi/orb/models/licenses/usage_get_all_usage_params.rbi +3 -3
- data/rbi/orb/models/licenses/usage_get_usage_params.rbi +9 -3
- data/rbi/orb/models/metric_fetch_params.rbi +13 -5
- data/rbi/orb/models/metric_update_params.rbi +6 -0
- 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 +2566 -209
- data/rbi/orb/models/plan_fetch_params.rbi +13 -5
- data/rbi/orb/models/plan_update_params.rbi +14 -0
- data/rbi/orb/models/plan_version.rbi +339 -0
- data/rbi/orb/models/plans/external_plan_id_fetch_params.rbi +13 -5
- data/rbi/orb/models/plans/external_plan_id_update_params.rbi +14 -0
- data/rbi/orb/models/plans/migration_cancel_params.rbi +10 -2
- data/rbi/orb/models/plans/migration_cancel_response.rbi +22 -1
- data/rbi/orb/models/plans/migration_list_params.rbi +6 -0
- data/rbi/orb/models/plans/migration_list_response.rbi +22 -1
- data/rbi/orb/models/plans/migration_retrieve_params.rbi +10 -2
- data/rbi/orb/models/plans/migration_retrieve_response.rbi +22 -1
- data/rbi/orb/models/price.rbi +4733 -2280
- data/rbi/orb/models/price_create_params.rbi +3022 -2408
- data/rbi/orb/models/price_evaluate_multiple_params.rbi +1540 -114
- data/rbi/orb/models/price_evaluate_params.rbi +6 -0
- data/rbi/orb/models/price_evaluate_preview_events_params.rbi +1540 -114
- data/rbi/orb/models/price_fetch_params.rbi +13 -5
- data/rbi/orb/models/price_interval.rbi +3 -0
- data/rbi/orb/models/price_update_params.rbi +6 -0
- data/rbi/orb/models/prices/external_price_id_fetch_params.rbi +13 -5
- data/rbi/orb/models/prices/external_price_id_update_params.rbi +6 -0
- data/rbi/orb/models/subscription.rbi +324 -2
- data/rbi/orb/models/subscription_cancel_params.rbi +6 -0
- data/rbi/orb/models/subscription_change_apply_params.rbi +6 -0
- data/rbi/orb/models/subscription_change_cancel_params.rbi +16 -5
- data/rbi/orb/models/subscription_change_retrieve_params.rbi +16 -5
- data/rbi/orb/models/subscription_create_params.rbi +4998 -1186
- data/rbi/orb/models/subscription_fetch_costs_params.rbi +6 -0
- data/rbi/orb/models/subscription_fetch_params.rbi +13 -5
- data/rbi/orb/models/subscription_fetch_schedule_params.rbi +6 -0
- data/rbi/orb/models/subscription_fetch_usage_params.rbi +6 -0
- data/rbi/orb/models/subscription_price_intervals_params.rbi +2133 -264
- data/rbi/orb/models/subscription_redeem_coupon_params.rbi +6 -0
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +5001 -1183
- data/rbi/orb/models/subscription_trigger_phase_params.rbi +6 -0
- data/rbi/orb/models/subscription_unschedule_cancellation_params.rbi +13 -5
- data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +10 -1
- data/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +13 -5
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +6 -0
- data/rbi/orb/models/subscription_update_params.rbi +20 -0
- data/rbi/orb/models/subscription_update_trial_params.rbi +6 -0
- data/rbi/orb/models.rbi +2 -0
- data/rbi/orb/resources/alerts.rbi +43 -0
- data/rbi/orb/resources/coupons.rbi +1 -2
- data/rbi/orb/resources/credit_blocks.rbi +10 -7
- data/rbi/orb/resources/customers/credits/ledger.rbi +50 -146
- data/rbi/orb/resources/customers.rbi +35 -7
- data/rbi/orb/resources/events/backfills.rbi +3 -4
- data/rbi/orb/resources/events.rbi +8 -35
- data/rbi/orb/resources/invoices.rbi +20 -6
- 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 +38 -184
- data/rbi/orb/resources/subscriptions.rbi +33 -4
- data/sig/orb/client.rbs +3 -0
- data/sig/orb/internal/util.rbs +4 -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 +90 -3
- data/sig/orb/models/alert_create_for_customer_params.rbs +5 -0
- data/sig/orb/models/alert_create_for_external_customer_params.rbs +5 -0
- data/sig/orb/models/alert_create_for_subscription_params.rbs +98 -1
- data/sig/orb/models/alert_disable_params.rbs +6 -1
- data/sig/orb/models/alert_enable_params.rbs +6 -1
- data/sig/orb/models/alert_retrieve_params.rbs +9 -3
- data/sig/orb/models/alert_update_params.rbs +90 -1
- data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +2318 -397
- data/sig/orb/models/beta/external_plan_id_fetch_plan_version_params.rbs +6 -1
- data/sig/orb/models/beta/external_plan_id_set_default_plan_version_params.rbs +6 -1
- data/sig/orb/models/beta_create_plan_version_params.rbs +2300 -389
- data/sig/orb/models/beta_fetch_plan_version_params.rbs +10 -2
- data/sig/orb/models/beta_set_default_plan_version_params.rbs +10 -2
- data/sig/orb/models/changed_subscription_resources.rbs +140 -1
- data/sig/orb/models/conversion_rate_config.rbs +12 -0
- data/sig/orb/models/coupon_archive_params.rbs +12 -3
- data/sig/orb/models/coupon_fetch_params.rbs +12 -3
- data/sig/orb/models/coupons/subscription_list_params.rbs +5 -1
- data/sig/orb/models/credit_block_delete_params.rbs +8 -3
- data/sig/orb/models/credit_block_list_invoices_params.rbs +8 -3
- data/sig/orb/models/credit_block_list_invoices_response.rbs +124 -3
- data/sig/orb/models/credit_block_retrieve_params.rbs +8 -3
- data/sig/orb/models/credit_block_retrieve_response.rbs +124 -3
- data/sig/orb/models/credit_note_fetch_params.rbs +11 -3
- data/sig/orb/models/customer.rbs +79 -1
- data/sig/orb/models/customer_create_params.rbs +12 -1
- data/sig/orb/models/customer_delete_params.rbs +12 -3
- data/sig/orb/models/customer_fetch_by_external_id_params.rbs +11 -3
- data/sig/orb/models/customer_fetch_params.rbs +12 -3
- data/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs +11 -3
- data/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs +11 -3
- data/sig/orb/models/customer_tax_id.rbs +20 -2
- data/sig/orb/models/customer_update_by_external_id_params.rbs +22 -1
- data/sig/orb/models/customer_update_params.rbs +22 -1
- data/sig/orb/models/customers/balance_transaction_create_params.rbs +5 -0
- data/sig/orb/models/customers/balance_transaction_list_params.rbs +5 -0
- data/sig/orb/models/customers/cost_list_by_external_id_params.rbs +5 -0
- data/sig/orb/models/customers/cost_list_params.rbs +5 -0
- data/sig/orb/models/customers/credit_list_by_external_id_params.rbs +5 -0
- data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +124 -3
- data/sig/orb/models/customers/credit_list_params.rbs +5 -0
- data/sig/orb/models/customers/credit_list_response.rbs +124 -3
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +345 -157
- data/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +345 -157
- data/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs +5 -0
- data/sig/orb/models/customers/credits/ledger_list_params.rbs +5 -0
- data/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs +5 -0
- data/sig/orb/models/customers/credits/top_up_create_params.rbs +5 -0
- data/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs +5 -1
- data/sig/orb/models/customers/credits/top_up_delete_params.rbs +6 -1
- data/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs +5 -1
- data/sig/orb/models/customers/credits/top_up_list_params.rbs +5 -1
- data/sig/orb/models/dimensional_price_group_retrieve_params.rbs +12 -3
- data/sig/orb/models/dimensional_price_group_update_params.rbs +5 -0
- data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs +12 -3
- data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbs +5 -0
- data/sig/orb/models/discount.rbs +114 -0
- data/sig/orb/models/event_deprecate_params.rbs +9 -3
- data/sig/orb/models/event_update_params.rbs +5 -0
- data/sig/orb/models/events/backfill_close_params.rbs +11 -3
- data/sig/orb/models/events/backfill_fetch_params.rbs +11 -3
- data/sig/orb/models/events/backfill_revert_params.rbs +11 -3
- data/sig/orb/models/invoice.rbs +140 -1
- data/sig/orb/models/invoice_delete_line_item_params.rbs +6 -1
- data/sig/orb/models/invoice_fetch_params.rbs +12 -3
- data/sig/orb/models/invoice_fetch_upcoming_response.rbs +140 -1
- data/sig/orb/models/invoice_issue_params.rbs +6 -1
- data/sig/orb/models/invoice_issue_summary_params.rbs +6 -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/invoice_mark_paid_params.rbs +10 -1
- data/sig/orb/models/invoice_pay_params.rbs +17 -3
- data/sig/orb/models/invoice_update_params.rbs +5 -0
- data/sig/orb/models/invoice_void_params.rbs +12 -3
- data/sig/orb/models/item_archive_params.rbs +9 -3
- data/sig/orb/models/item_fetch_params.rbs +9 -3
- data/sig/orb/models/item_update_params.rbs +5 -0
- data/sig/orb/models/license_deactivate_params.rbs +10 -2
- data/sig/orb/models/license_retrieve_by_external_id_params.rbs +9 -1
- data/sig/orb/models/license_retrieve_params.rbs +11 -3
- data/sig/orb/models/license_type_retrieve_params.rbs +11 -3
- data/sig/orb/models/licenses/external_license_get_usage_params.rbs +9 -4
- data/sig/orb/models/licenses/usage_get_all_usage_params.rbs +4 -4
- data/sig/orb/models/licenses/usage_get_usage_params.rbs +9 -4
- data/sig/orb/models/metric_fetch_params.rbs +12 -3
- data/sig/orb/models/metric_update_params.rbs +5 -1
- 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 +1030 -72
- data/sig/orb/models/plan_fetch_params.rbs +9 -3
- data/sig/orb/models/plan_update_params.rbs +14 -1
- data/sig/orb/models/plan_version.rbs +134 -0
- data/sig/orb/models/plans/external_plan_id_fetch_params.rbs +11 -3
- data/sig/orb/models/plans/external_plan_id_update_params.rbs +14 -1
- data/sig/orb/models/plans/migration_cancel_params.rbs +6 -1
- data/sig/orb/models/plans/migration_list_params.rbs +5 -1
- data/sig/orb/models/plans/migration_retrieve_params.rbs +6 -1
- data/sig/orb/models/price.rbs +2361 -1156
- data/sig/orb/models/price_create_params.rbs +1124 -931
- data/sig/orb/models/price_evaluate_multiple_params.rbs +626 -23
- data/sig/orb/models/price_evaluate_params.rbs +5 -0
- data/sig/orb/models/price_evaluate_preview_events_params.rbs +626 -23
- data/sig/orb/models/price_fetch_params.rbs +9 -3
- data/sig/orb/models/price_update_params.rbs +5 -1
- data/sig/orb/models/prices/external_price_id_fetch_params.rbs +11 -3
- data/sig/orb/models/prices/external_price_id_update_params.rbs +5 -1
- data/sig/orb/models/subscription.rbs +124 -0
- data/sig/orb/models/subscription_cancel_params.rbs +5 -0
- data/sig/orb/models/subscription_change_apply_params.rbs +5 -0
- data/sig/orb/models/subscription_change_cancel_params.rbs +12 -3
- data/sig/orb/models/subscription_change_retrieve_params.rbs +12 -3
- data/sig/orb/models/subscription_create_params.rbs +2009 -430
- data/sig/orb/models/subscription_fetch_costs_params.rbs +5 -0
- data/sig/orb/models/subscription_fetch_params.rbs +11 -3
- data/sig/orb/models/subscription_fetch_schedule_params.rbs +5 -0
- data/sig/orb/models/subscription_fetch_usage_params.rbs +5 -0
- data/sig/orb/models/subscription_price_intervals_params.rbs +800 -23
- data/sig/orb/models/subscription_redeem_coupon_params.rbs +5 -0
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +2014 -430
- data/sig/orb/models/subscription_trigger_phase_params.rbs +9 -1
- data/sig/orb/models/subscription_unschedule_cancellation_params.rbs +11 -3
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs +10 -2
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs +11 -3
- data/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs +5 -0
- data/sig/orb/models/subscription_update_params.rbs +10 -0
- data/sig/orb/models/subscription_update_trial_params.rbs +5 -0
- data/sig/orb/models.rbs +2 -0
- data/sig/orb/resources/alerts.rbs +6 -0
- data/sig/orb/resources/customers/credits/ledger.rbs +2 -26
- data/sig/orb/resources/customers.rbs +2 -0
- data/sig/orb/resources/invoices.rbs +1 -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/prices.rbs +1 -48
- data/sig/orb/resources/subscriptions.rbs +3 -0
- metadata +6 -7
|
@@ -137,6 +137,7 @@ module Orb
|
|
|
137
137
|
Orb::NewFloatingPackageWithAllocationPrice,
|
|
138
138
|
Orb::NewFloatingUnitWithPercentPrice,
|
|
139
139
|
Orb::NewFloatingMatrixWithAllocationPrice,
|
|
140
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts,
|
|
140
141
|
Orb::NewFloatingTieredWithProrationPrice,
|
|
141
142
|
Orb::NewFloatingUnitWithProrationPrice,
|
|
142
143
|
Orb::NewFloatingGroupedAllocationPrice,
|
|
@@ -151,6 +152,8 @@ module Orb
|
|
|
151
152
|
Orb::NewFloatingScalableMatrixWithTieredPricingPrice,
|
|
152
153
|
Orb::NewFloatingCumulativeGroupedBulkPrice,
|
|
153
154
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation,
|
|
155
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance,
|
|
156
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance,
|
|
154
157
|
Orb::NewFloatingMinimumCompositePrice,
|
|
155
158
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent,
|
|
156
159
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput
|
|
@@ -187,6 +190,7 @@ module Orb
|
|
|
187
190
|
Orb::NewFloatingPackageWithAllocationPrice::OrHash,
|
|
188
191
|
Orb::NewFloatingUnitWithPercentPrice::OrHash,
|
|
189
192
|
Orb::NewFloatingMatrixWithAllocationPrice::OrHash,
|
|
193
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::OrHash,
|
|
190
194
|
Orb::NewFloatingTieredWithProrationPrice::OrHash,
|
|
191
195
|
Orb::NewFloatingUnitWithProrationPrice::OrHash,
|
|
192
196
|
Orb::NewFloatingGroupedAllocationPrice::OrHash,
|
|
@@ -201,6 +205,8 @@ module Orb
|
|
|
201
205
|
Orb::NewFloatingScalableMatrixWithTieredPricingPrice::OrHash,
|
|
202
206
|
Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash,
|
|
203
207
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::OrHash,
|
|
208
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::OrHash,
|
|
209
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::OrHash,
|
|
204
210
|
Orb::NewFloatingMinimumCompositePrice::OrHash,
|
|
205
211
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent::OrHash,
|
|
206
212
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput::OrHash
|
|
@@ -255,6 +261,7 @@ module Orb
|
|
|
255
261
|
Orb::NewFloatingPackageWithAllocationPrice,
|
|
256
262
|
Orb::NewFloatingUnitWithPercentPrice,
|
|
257
263
|
Orb::NewFloatingMatrixWithAllocationPrice,
|
|
264
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts,
|
|
258
265
|
Orb::NewFloatingTieredWithProrationPrice,
|
|
259
266
|
Orb::NewFloatingUnitWithProrationPrice,
|
|
260
267
|
Orb::NewFloatingGroupedAllocationPrice,
|
|
@@ -269,6 +276,8 @@ module Orb
|
|
|
269
276
|
Orb::NewFloatingScalableMatrixWithTieredPricingPrice,
|
|
270
277
|
Orb::NewFloatingCumulativeGroupedBulkPrice,
|
|
271
278
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation,
|
|
279
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance,
|
|
280
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance,
|
|
272
281
|
Orb::NewFloatingMinimumCompositePrice,
|
|
273
282
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent,
|
|
274
283
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput
|
|
@@ -302,6 +311,7 @@ module Orb
|
|
|
302
311
|
Orb::NewFloatingPackageWithAllocationPrice,
|
|
303
312
|
Orb::NewFloatingUnitWithPercentPrice,
|
|
304
313
|
Orb::NewFloatingMatrixWithAllocationPrice,
|
|
314
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts,
|
|
305
315
|
Orb::NewFloatingTieredWithProrationPrice,
|
|
306
316
|
Orb::NewFloatingUnitWithProrationPrice,
|
|
307
317
|
Orb::NewFloatingGroupedAllocationPrice,
|
|
@@ -316,6 +326,8 @@ module Orb
|
|
|
316
326
|
Orb::NewFloatingScalableMatrixWithTieredPricingPrice,
|
|
317
327
|
Orb::NewFloatingCumulativeGroupedBulkPrice,
|
|
318
328
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation,
|
|
329
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance,
|
|
330
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance,
|
|
319
331
|
Orb::NewFloatingMinimumCompositePrice,
|
|
320
332
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent,
|
|
321
333
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput
|
|
@@ -782,11 +794,1280 @@ module Orb
|
|
|
782
794
|
end
|
|
783
795
|
end
|
|
784
796
|
|
|
797
|
+
class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel
|
|
798
|
+
OrHash =
|
|
799
|
+
T.type_alias do
|
|
800
|
+
T.any(
|
|
801
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts,
|
|
802
|
+
Orb::Internal::AnyHash
|
|
803
|
+
)
|
|
804
|
+
end
|
|
805
|
+
|
|
806
|
+
# The cadence to bill for this price on.
|
|
807
|
+
sig do
|
|
808
|
+
returns(
|
|
809
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol
|
|
810
|
+
)
|
|
811
|
+
end
|
|
812
|
+
attr_accessor :cadence
|
|
813
|
+
|
|
814
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
815
|
+
sig { returns(String) }
|
|
816
|
+
attr_accessor :currency
|
|
817
|
+
|
|
818
|
+
# The id of the item the price will be associated with.
|
|
819
|
+
sig { returns(String) }
|
|
820
|
+
attr_accessor :item_id
|
|
821
|
+
|
|
822
|
+
# Configuration for matrix_with_threshold_discounts pricing
|
|
823
|
+
sig do
|
|
824
|
+
returns(
|
|
825
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig
|
|
826
|
+
)
|
|
827
|
+
end
|
|
828
|
+
attr_reader :matrix_with_threshold_discounts_config
|
|
829
|
+
|
|
830
|
+
sig do
|
|
831
|
+
params(
|
|
832
|
+
matrix_with_threshold_discounts_config:
|
|
833
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash
|
|
834
|
+
).void
|
|
835
|
+
end
|
|
836
|
+
attr_writer :matrix_with_threshold_discounts_config
|
|
837
|
+
|
|
838
|
+
# The pricing model type
|
|
839
|
+
sig { returns(Symbol) }
|
|
840
|
+
attr_accessor :model_type
|
|
841
|
+
|
|
842
|
+
# The name of the price.
|
|
843
|
+
sig { returns(String) }
|
|
844
|
+
attr_accessor :name
|
|
845
|
+
|
|
846
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
847
|
+
# usage-based.
|
|
848
|
+
sig { returns(T.nilable(String)) }
|
|
849
|
+
attr_accessor :billable_metric_id
|
|
850
|
+
|
|
851
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
852
|
+
# this is true, and in-arrears if this is false.
|
|
853
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
854
|
+
attr_accessor :billed_in_advance
|
|
855
|
+
|
|
856
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
857
|
+
# months.
|
|
858
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
859
|
+
attr_reader :billing_cycle_configuration
|
|
860
|
+
|
|
861
|
+
sig do
|
|
862
|
+
params(
|
|
863
|
+
billing_cycle_configuration:
|
|
864
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
865
|
+
).void
|
|
866
|
+
end
|
|
867
|
+
attr_writer :billing_cycle_configuration
|
|
868
|
+
|
|
869
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
870
|
+
sig { returns(T.nilable(Float)) }
|
|
871
|
+
attr_accessor :conversion_rate
|
|
872
|
+
|
|
873
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
874
|
+
sig do
|
|
875
|
+
returns(
|
|
876
|
+
T.nilable(
|
|
877
|
+
T.any(
|
|
878
|
+
Orb::UnitConversionRateConfig,
|
|
879
|
+
Orb::TieredConversionRateConfig
|
|
880
|
+
)
|
|
881
|
+
)
|
|
882
|
+
)
|
|
883
|
+
end
|
|
884
|
+
attr_accessor :conversion_rate_config
|
|
885
|
+
|
|
886
|
+
# For dimensional price: specifies a price group and dimension values
|
|
887
|
+
sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
|
|
888
|
+
attr_reader :dimensional_price_configuration
|
|
889
|
+
|
|
890
|
+
sig do
|
|
891
|
+
params(
|
|
892
|
+
dimensional_price_configuration:
|
|
893
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
|
|
894
|
+
).void
|
|
895
|
+
end
|
|
896
|
+
attr_writer :dimensional_price_configuration
|
|
897
|
+
|
|
898
|
+
# An alias for the price.
|
|
899
|
+
sig { returns(T.nilable(String)) }
|
|
900
|
+
attr_accessor :external_price_id
|
|
901
|
+
|
|
902
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
903
|
+
# applied.
|
|
904
|
+
sig { returns(T.nilable(Float)) }
|
|
905
|
+
attr_accessor :fixed_price_quantity
|
|
906
|
+
|
|
907
|
+
# The property used to group this price on an invoice
|
|
908
|
+
sig { returns(T.nilable(String)) }
|
|
909
|
+
attr_accessor :invoice_grouping_key
|
|
910
|
+
|
|
911
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
912
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
913
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
914
|
+
attr_reader :invoicing_cycle_configuration
|
|
915
|
+
|
|
916
|
+
sig do
|
|
917
|
+
params(
|
|
918
|
+
invoicing_cycle_configuration:
|
|
919
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
920
|
+
).void
|
|
921
|
+
end
|
|
922
|
+
attr_writer :invoicing_cycle_configuration
|
|
923
|
+
|
|
924
|
+
# The ID of the license type to associate with this price.
|
|
925
|
+
sig { returns(T.nilable(String)) }
|
|
926
|
+
attr_accessor :license_type_id
|
|
927
|
+
|
|
928
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
929
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
930
|
+
# by setting `metadata` to `null`.
|
|
931
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
932
|
+
attr_accessor :metadata
|
|
933
|
+
|
|
934
|
+
sig do
|
|
935
|
+
params(
|
|
936
|
+
cadence:
|
|
937
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol,
|
|
938
|
+
currency: String,
|
|
939
|
+
item_id: String,
|
|
940
|
+
matrix_with_threshold_discounts_config:
|
|
941
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash,
|
|
942
|
+
name: String,
|
|
943
|
+
billable_metric_id: T.nilable(String),
|
|
944
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
945
|
+
billing_cycle_configuration:
|
|
946
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
947
|
+
conversion_rate: T.nilable(Float),
|
|
948
|
+
conversion_rate_config:
|
|
949
|
+
T.nilable(
|
|
950
|
+
T.any(
|
|
951
|
+
Orb::UnitConversionRateConfig::OrHash,
|
|
952
|
+
Orb::TieredConversionRateConfig::OrHash
|
|
953
|
+
)
|
|
954
|
+
),
|
|
955
|
+
dimensional_price_configuration:
|
|
956
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
|
|
957
|
+
external_price_id: T.nilable(String),
|
|
958
|
+
fixed_price_quantity: T.nilable(Float),
|
|
959
|
+
invoice_grouping_key: T.nilable(String),
|
|
960
|
+
invoicing_cycle_configuration:
|
|
961
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
962
|
+
license_type_id: T.nilable(String),
|
|
963
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
964
|
+
model_type: Symbol
|
|
965
|
+
).returns(T.attached_class)
|
|
966
|
+
end
|
|
967
|
+
def self.new(
|
|
968
|
+
# The cadence to bill for this price on.
|
|
969
|
+
cadence:,
|
|
970
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
971
|
+
currency:,
|
|
972
|
+
# The id of the item the price will be associated with.
|
|
973
|
+
item_id:,
|
|
974
|
+
# Configuration for matrix_with_threshold_discounts pricing
|
|
975
|
+
matrix_with_threshold_discounts_config:,
|
|
976
|
+
# The name of the price.
|
|
977
|
+
name:,
|
|
978
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
979
|
+
# usage-based.
|
|
980
|
+
billable_metric_id: nil,
|
|
981
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
982
|
+
# this is true, and in-arrears if this is false.
|
|
983
|
+
billed_in_advance: nil,
|
|
984
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
985
|
+
# months.
|
|
986
|
+
billing_cycle_configuration: nil,
|
|
987
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
988
|
+
conversion_rate: nil,
|
|
989
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
990
|
+
conversion_rate_config: nil,
|
|
991
|
+
# For dimensional price: specifies a price group and dimension values
|
|
992
|
+
dimensional_price_configuration: nil,
|
|
993
|
+
# An alias for the price.
|
|
994
|
+
external_price_id: nil,
|
|
995
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
996
|
+
# applied.
|
|
997
|
+
fixed_price_quantity: nil,
|
|
998
|
+
# The property used to group this price on an invoice
|
|
999
|
+
invoice_grouping_key: nil,
|
|
1000
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1001
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1002
|
+
invoicing_cycle_configuration: nil,
|
|
1003
|
+
# The ID of the license type to associate with this price.
|
|
1004
|
+
license_type_id: nil,
|
|
1005
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1006
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1007
|
+
# by setting `metadata` to `null`.
|
|
1008
|
+
metadata: nil,
|
|
1009
|
+
# The pricing model type
|
|
1010
|
+
model_type: :matrix_with_threshold_discounts
|
|
1011
|
+
)
|
|
1012
|
+
end
|
|
1013
|
+
|
|
1014
|
+
sig do
|
|
1015
|
+
override.returns(
|
|
1016
|
+
{
|
|
1017
|
+
cadence:
|
|
1018
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol,
|
|
1019
|
+
currency: String,
|
|
1020
|
+
item_id: String,
|
|
1021
|
+
matrix_with_threshold_discounts_config:
|
|
1022
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig,
|
|
1023
|
+
model_type: Symbol,
|
|
1024
|
+
name: String,
|
|
1025
|
+
billable_metric_id: T.nilable(String),
|
|
1026
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1027
|
+
billing_cycle_configuration:
|
|
1028
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1029
|
+
conversion_rate: T.nilable(Float),
|
|
1030
|
+
conversion_rate_config:
|
|
1031
|
+
T.nilable(
|
|
1032
|
+
T.any(
|
|
1033
|
+
Orb::UnitConversionRateConfig,
|
|
1034
|
+
Orb::TieredConversionRateConfig
|
|
1035
|
+
)
|
|
1036
|
+
),
|
|
1037
|
+
dimensional_price_configuration:
|
|
1038
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration),
|
|
1039
|
+
external_price_id: T.nilable(String),
|
|
1040
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1041
|
+
invoice_grouping_key: T.nilable(String),
|
|
1042
|
+
invoicing_cycle_configuration:
|
|
1043
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1044
|
+
license_type_id: T.nilable(String),
|
|
1045
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)])
|
|
1046
|
+
}
|
|
1047
|
+
)
|
|
1048
|
+
end
|
|
1049
|
+
def to_hash
|
|
1050
|
+
end
|
|
1051
|
+
|
|
1052
|
+
# The cadence to bill for this price on.
|
|
1053
|
+
module Cadence
|
|
1054
|
+
extend Orb::Internal::Type::Enum
|
|
1055
|
+
|
|
1056
|
+
TaggedSymbol =
|
|
1057
|
+
T.type_alias do
|
|
1058
|
+
T.all(
|
|
1059
|
+
Symbol,
|
|
1060
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence
|
|
1061
|
+
)
|
|
1062
|
+
end
|
|
1063
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1064
|
+
|
|
1065
|
+
ANNUAL =
|
|
1066
|
+
T.let(
|
|
1067
|
+
:annual,
|
|
1068
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
|
|
1069
|
+
)
|
|
1070
|
+
SEMI_ANNUAL =
|
|
1071
|
+
T.let(
|
|
1072
|
+
:semi_annual,
|
|
1073
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
|
|
1074
|
+
)
|
|
1075
|
+
MONTHLY =
|
|
1076
|
+
T.let(
|
|
1077
|
+
:monthly,
|
|
1078
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
|
|
1079
|
+
)
|
|
1080
|
+
QUARTERLY =
|
|
1081
|
+
T.let(
|
|
1082
|
+
:quarterly,
|
|
1083
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
|
|
1084
|
+
)
|
|
1085
|
+
ONE_TIME =
|
|
1086
|
+
T.let(
|
|
1087
|
+
:one_time,
|
|
1088
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
|
|
1089
|
+
)
|
|
1090
|
+
CUSTOM =
|
|
1091
|
+
T.let(
|
|
1092
|
+
:custom,
|
|
1093
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
|
|
1094
|
+
)
|
|
1095
|
+
|
|
1096
|
+
sig do
|
|
1097
|
+
override.returns(
|
|
1098
|
+
T::Array[
|
|
1099
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
|
|
1100
|
+
]
|
|
1101
|
+
)
|
|
1102
|
+
end
|
|
1103
|
+
def self.values
|
|
1104
|
+
end
|
|
1105
|
+
end
|
|
1106
|
+
|
|
1107
|
+
class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel
|
|
1108
|
+
OrHash =
|
|
1109
|
+
T.type_alias do
|
|
1110
|
+
T.any(
|
|
1111
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig,
|
|
1112
|
+
Orb::Internal::AnyHash
|
|
1113
|
+
)
|
|
1114
|
+
end
|
|
1115
|
+
|
|
1116
|
+
# Unit price used for usage that does not match any defined matrix cell.
|
|
1117
|
+
sig { returns(String) }
|
|
1118
|
+
attr_accessor :default_unit_amount
|
|
1119
|
+
|
|
1120
|
+
# First matrix dimension key.
|
|
1121
|
+
sig { returns(String) }
|
|
1122
|
+
attr_accessor :first_dimension
|
|
1123
|
+
|
|
1124
|
+
# Per-cell unit prices.
|
|
1125
|
+
sig do
|
|
1126
|
+
returns(
|
|
1127
|
+
T::Array[
|
|
1128
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue
|
|
1129
|
+
]
|
|
1130
|
+
)
|
|
1131
|
+
end
|
|
1132
|
+
attr_accessor :matrix_values
|
|
1133
|
+
|
|
1134
|
+
# Optional second matrix dimension key.
|
|
1135
|
+
sig { returns(T.nilable(String)) }
|
|
1136
|
+
attr_accessor :second_dimension
|
|
1137
|
+
|
|
1138
|
+
sig do
|
|
1139
|
+
returns(
|
|
1140
|
+
T.nilable(
|
|
1141
|
+
T::Array[
|
|
1142
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup
|
|
1143
|
+
]
|
|
1144
|
+
)
|
|
1145
|
+
)
|
|
1146
|
+
end
|
|
1147
|
+
attr_reader :threshold_discount_groups
|
|
1148
|
+
|
|
1149
|
+
sig do
|
|
1150
|
+
params(
|
|
1151
|
+
threshold_discount_groups:
|
|
1152
|
+
T::Array[
|
|
1153
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash
|
|
1154
|
+
]
|
|
1155
|
+
).void
|
|
1156
|
+
end
|
|
1157
|
+
attr_writer :threshold_discount_groups
|
|
1158
|
+
|
|
1159
|
+
# Configuration for matrix_with_threshold_discounts pricing
|
|
1160
|
+
sig do
|
|
1161
|
+
params(
|
|
1162
|
+
default_unit_amount: String,
|
|
1163
|
+
first_dimension: String,
|
|
1164
|
+
matrix_values:
|
|
1165
|
+
T::Array[
|
|
1166
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash
|
|
1167
|
+
],
|
|
1168
|
+
second_dimension: T.nilable(String),
|
|
1169
|
+
threshold_discount_groups:
|
|
1170
|
+
T::Array[
|
|
1171
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash
|
|
1172
|
+
]
|
|
1173
|
+
).returns(T.attached_class)
|
|
1174
|
+
end
|
|
1175
|
+
def self.new(
|
|
1176
|
+
# Unit price used for usage that does not match any defined matrix cell.
|
|
1177
|
+
default_unit_amount:,
|
|
1178
|
+
# First matrix dimension key.
|
|
1179
|
+
first_dimension:,
|
|
1180
|
+
# Per-cell unit prices.
|
|
1181
|
+
matrix_values:,
|
|
1182
|
+
# Optional second matrix dimension key.
|
|
1183
|
+
second_dimension: nil,
|
|
1184
|
+
threshold_discount_groups: nil
|
|
1185
|
+
)
|
|
1186
|
+
end
|
|
1187
|
+
|
|
1188
|
+
sig do
|
|
1189
|
+
override.returns(
|
|
1190
|
+
{
|
|
1191
|
+
default_unit_amount: String,
|
|
1192
|
+
first_dimension: String,
|
|
1193
|
+
matrix_values:
|
|
1194
|
+
T::Array[
|
|
1195
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue
|
|
1196
|
+
],
|
|
1197
|
+
second_dimension: T.nilable(String),
|
|
1198
|
+
threshold_discount_groups:
|
|
1199
|
+
T::Array[
|
|
1200
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup
|
|
1201
|
+
]
|
|
1202
|
+
}
|
|
1203
|
+
)
|
|
1204
|
+
end
|
|
1205
|
+
def to_hash
|
|
1206
|
+
end
|
|
1207
|
+
|
|
1208
|
+
class MatrixValue < Orb::Internal::Type::BaseModel
|
|
1209
|
+
OrHash =
|
|
1210
|
+
T.type_alias do
|
|
1211
|
+
T.any(
|
|
1212
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue,
|
|
1213
|
+
Orb::Internal::AnyHash
|
|
1214
|
+
)
|
|
1215
|
+
end
|
|
1216
|
+
|
|
1217
|
+
sig { returns(String) }
|
|
1218
|
+
attr_accessor :first_dimension_value
|
|
1219
|
+
|
|
1220
|
+
sig { returns(String) }
|
|
1221
|
+
attr_accessor :unit_amount
|
|
1222
|
+
|
|
1223
|
+
sig { returns(T.nilable(String)) }
|
|
1224
|
+
attr_accessor :second_dimension_value
|
|
1225
|
+
|
|
1226
|
+
sig do
|
|
1227
|
+
params(
|
|
1228
|
+
first_dimension_value: String,
|
|
1229
|
+
unit_amount: String,
|
|
1230
|
+
second_dimension_value: T.nilable(String)
|
|
1231
|
+
).returns(T.attached_class)
|
|
1232
|
+
end
|
|
1233
|
+
def self.new(
|
|
1234
|
+
first_dimension_value:,
|
|
1235
|
+
unit_amount:,
|
|
1236
|
+
second_dimension_value: nil
|
|
1237
|
+
)
|
|
1238
|
+
end
|
|
1239
|
+
|
|
1240
|
+
sig do
|
|
1241
|
+
override.returns(
|
|
1242
|
+
{
|
|
1243
|
+
first_dimension_value: String,
|
|
1244
|
+
unit_amount: String,
|
|
1245
|
+
second_dimension_value: T.nilable(String)
|
|
1246
|
+
}
|
|
1247
|
+
)
|
|
1248
|
+
end
|
|
1249
|
+
def to_hash
|
|
1250
|
+
end
|
|
1251
|
+
end
|
|
1252
|
+
|
|
1253
|
+
class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel
|
|
1254
|
+
OrHash =
|
|
1255
|
+
T.type_alias do
|
|
1256
|
+
T.any(
|
|
1257
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup,
|
|
1258
|
+
Orb::Internal::AnyHash
|
|
1259
|
+
)
|
|
1260
|
+
end
|
|
1261
|
+
|
|
1262
|
+
# Discount rate applied to spend above the threshold.
|
|
1263
|
+
sig { returns(String) }
|
|
1264
|
+
attr_accessor :above_threshold_discount_percentage
|
|
1265
|
+
|
|
1266
|
+
# Discount rate applied to spend at or below the threshold. Set to 0 for no
|
|
1267
|
+
# baseline discount.
|
|
1268
|
+
sig { returns(String) }
|
|
1269
|
+
attr_accessor :below_threshold_discount_percentage
|
|
1270
|
+
|
|
1271
|
+
# Semicolon-separated list of matrix cell coordinates targeted by this group. Each
|
|
1272
|
+
# coordinate is `first,second` when the matrix has two dimensions, or just `first`
|
|
1273
|
+
# for a single-dimension matrix. Example: `blue,circle;green,triangle`.
|
|
1274
|
+
sig { returns(String) }
|
|
1275
|
+
attr_accessor :cell_coordinates
|
|
1276
|
+
|
|
1277
|
+
sig { returns(String) }
|
|
1278
|
+
attr_accessor :threshold_amount
|
|
1279
|
+
|
|
1280
|
+
sig { returns(T.nilable(String)) }
|
|
1281
|
+
attr_accessor :description
|
|
1282
|
+
|
|
1283
|
+
sig do
|
|
1284
|
+
params(
|
|
1285
|
+
above_threshold_discount_percentage: String,
|
|
1286
|
+
below_threshold_discount_percentage: String,
|
|
1287
|
+
cell_coordinates: String,
|
|
1288
|
+
threshold_amount: String,
|
|
1289
|
+
description: T.nilable(String)
|
|
1290
|
+
).returns(T.attached_class)
|
|
1291
|
+
end
|
|
1292
|
+
def self.new(
|
|
1293
|
+
# Discount rate applied to spend above the threshold.
|
|
1294
|
+
above_threshold_discount_percentage:,
|
|
1295
|
+
# Discount rate applied to spend at or below the threshold. Set to 0 for no
|
|
1296
|
+
# baseline discount.
|
|
1297
|
+
below_threshold_discount_percentage:,
|
|
1298
|
+
# Semicolon-separated list of matrix cell coordinates targeted by this group. Each
|
|
1299
|
+
# coordinate is `first,second` when the matrix has two dimensions, or just `first`
|
|
1300
|
+
# for a single-dimension matrix. Example: `blue,circle;green,triangle`.
|
|
1301
|
+
cell_coordinates:,
|
|
1302
|
+
threshold_amount:,
|
|
1303
|
+
description: nil
|
|
1304
|
+
)
|
|
1305
|
+
end
|
|
1306
|
+
|
|
1307
|
+
sig do
|
|
1308
|
+
override.returns(
|
|
1309
|
+
{
|
|
1310
|
+
above_threshold_discount_percentage: String,
|
|
1311
|
+
below_threshold_discount_percentage: String,
|
|
1312
|
+
cell_coordinates: String,
|
|
1313
|
+
threshold_amount: String,
|
|
1314
|
+
description: T.nilable(String)
|
|
1315
|
+
}
|
|
1316
|
+
)
|
|
1317
|
+
end
|
|
1318
|
+
def to_hash
|
|
1319
|
+
end
|
|
1320
|
+
end
|
|
1321
|
+
end
|
|
1322
|
+
end
|
|
1323
|
+
|
|
785
1324
|
class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel
|
|
786
1325
|
OrHash =
|
|
787
1326
|
T.type_alias do
|
|
788
1327
|
T.any(
|
|
789
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds,
|
|
1328
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds,
|
|
1329
|
+
Orb::Internal::AnyHash
|
|
1330
|
+
)
|
|
1331
|
+
end
|
|
1332
|
+
|
|
1333
|
+
# The cadence to bill for this price on.
|
|
1334
|
+
sig do
|
|
1335
|
+
returns(
|
|
1336
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol
|
|
1337
|
+
)
|
|
1338
|
+
end
|
|
1339
|
+
attr_accessor :cadence
|
|
1340
|
+
|
|
1341
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
1342
|
+
sig { returns(String) }
|
|
1343
|
+
attr_accessor :currency
|
|
1344
|
+
|
|
1345
|
+
# Configuration for grouped_with_min_max_thresholds pricing
|
|
1346
|
+
sig do
|
|
1347
|
+
returns(
|
|
1348
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig
|
|
1349
|
+
)
|
|
1350
|
+
end
|
|
1351
|
+
attr_reader :grouped_with_min_max_thresholds_config
|
|
1352
|
+
|
|
1353
|
+
sig do
|
|
1354
|
+
params(
|
|
1355
|
+
grouped_with_min_max_thresholds_config:
|
|
1356
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash
|
|
1357
|
+
).void
|
|
1358
|
+
end
|
|
1359
|
+
attr_writer :grouped_with_min_max_thresholds_config
|
|
1360
|
+
|
|
1361
|
+
# The id of the item the price will be associated with.
|
|
1362
|
+
sig { returns(String) }
|
|
1363
|
+
attr_accessor :item_id
|
|
1364
|
+
|
|
1365
|
+
# The pricing model type
|
|
1366
|
+
sig { returns(Symbol) }
|
|
1367
|
+
attr_accessor :model_type
|
|
1368
|
+
|
|
1369
|
+
# The name of the price.
|
|
1370
|
+
sig { returns(String) }
|
|
1371
|
+
attr_accessor :name
|
|
1372
|
+
|
|
1373
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1374
|
+
# usage-based.
|
|
1375
|
+
sig { returns(T.nilable(String)) }
|
|
1376
|
+
attr_accessor :billable_metric_id
|
|
1377
|
+
|
|
1378
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1379
|
+
# this is true, and in-arrears if this is false.
|
|
1380
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
1381
|
+
attr_accessor :billed_in_advance
|
|
1382
|
+
|
|
1383
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1384
|
+
# months.
|
|
1385
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1386
|
+
attr_reader :billing_cycle_configuration
|
|
1387
|
+
|
|
1388
|
+
sig do
|
|
1389
|
+
params(
|
|
1390
|
+
billing_cycle_configuration:
|
|
1391
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1392
|
+
).void
|
|
1393
|
+
end
|
|
1394
|
+
attr_writer :billing_cycle_configuration
|
|
1395
|
+
|
|
1396
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1397
|
+
sig { returns(T.nilable(Float)) }
|
|
1398
|
+
attr_accessor :conversion_rate
|
|
1399
|
+
|
|
1400
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1401
|
+
sig do
|
|
1402
|
+
returns(
|
|
1403
|
+
T.nilable(
|
|
1404
|
+
T.any(
|
|
1405
|
+
Orb::UnitConversionRateConfig,
|
|
1406
|
+
Orb::TieredConversionRateConfig
|
|
1407
|
+
)
|
|
1408
|
+
)
|
|
1409
|
+
)
|
|
1410
|
+
end
|
|
1411
|
+
attr_accessor :conversion_rate_config
|
|
1412
|
+
|
|
1413
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1414
|
+
sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
|
|
1415
|
+
attr_reader :dimensional_price_configuration
|
|
1416
|
+
|
|
1417
|
+
sig do
|
|
1418
|
+
params(
|
|
1419
|
+
dimensional_price_configuration:
|
|
1420
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
|
|
1421
|
+
).void
|
|
1422
|
+
end
|
|
1423
|
+
attr_writer :dimensional_price_configuration
|
|
1424
|
+
|
|
1425
|
+
# An alias for the price.
|
|
1426
|
+
sig { returns(T.nilable(String)) }
|
|
1427
|
+
attr_accessor :external_price_id
|
|
1428
|
+
|
|
1429
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1430
|
+
# applied.
|
|
1431
|
+
sig { returns(T.nilable(Float)) }
|
|
1432
|
+
attr_accessor :fixed_price_quantity
|
|
1433
|
+
|
|
1434
|
+
# The property used to group this price on an invoice
|
|
1435
|
+
sig { returns(T.nilable(String)) }
|
|
1436
|
+
attr_accessor :invoice_grouping_key
|
|
1437
|
+
|
|
1438
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1439
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1440
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1441
|
+
attr_reader :invoicing_cycle_configuration
|
|
1442
|
+
|
|
1443
|
+
sig do
|
|
1444
|
+
params(
|
|
1445
|
+
invoicing_cycle_configuration:
|
|
1446
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1447
|
+
).void
|
|
1448
|
+
end
|
|
1449
|
+
attr_writer :invoicing_cycle_configuration
|
|
1450
|
+
|
|
1451
|
+
# The ID of the license type to associate with this price.
|
|
1452
|
+
sig { returns(T.nilable(String)) }
|
|
1453
|
+
attr_accessor :license_type_id
|
|
1454
|
+
|
|
1455
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1456
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1457
|
+
# by setting `metadata` to `null`.
|
|
1458
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
1459
|
+
attr_accessor :metadata
|
|
1460
|
+
|
|
1461
|
+
sig do
|
|
1462
|
+
params(
|
|
1463
|
+
cadence:
|
|
1464
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol,
|
|
1465
|
+
currency: String,
|
|
1466
|
+
grouped_with_min_max_thresholds_config:
|
|
1467
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash,
|
|
1468
|
+
item_id: String,
|
|
1469
|
+
name: String,
|
|
1470
|
+
billable_metric_id: T.nilable(String),
|
|
1471
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1472
|
+
billing_cycle_configuration:
|
|
1473
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1474
|
+
conversion_rate: T.nilable(Float),
|
|
1475
|
+
conversion_rate_config:
|
|
1476
|
+
T.nilable(
|
|
1477
|
+
T.any(
|
|
1478
|
+
Orb::UnitConversionRateConfig::OrHash,
|
|
1479
|
+
Orb::TieredConversionRateConfig::OrHash
|
|
1480
|
+
)
|
|
1481
|
+
),
|
|
1482
|
+
dimensional_price_configuration:
|
|
1483
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
|
|
1484
|
+
external_price_id: T.nilable(String),
|
|
1485
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1486
|
+
invoice_grouping_key: T.nilable(String),
|
|
1487
|
+
invoicing_cycle_configuration:
|
|
1488
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1489
|
+
license_type_id: T.nilable(String),
|
|
1490
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
1491
|
+
model_type: Symbol
|
|
1492
|
+
).returns(T.attached_class)
|
|
1493
|
+
end
|
|
1494
|
+
def self.new(
|
|
1495
|
+
# The cadence to bill for this price on.
|
|
1496
|
+
cadence:,
|
|
1497
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
1498
|
+
currency:,
|
|
1499
|
+
# Configuration for grouped_with_min_max_thresholds pricing
|
|
1500
|
+
grouped_with_min_max_thresholds_config:,
|
|
1501
|
+
# The id of the item the price will be associated with.
|
|
1502
|
+
item_id:,
|
|
1503
|
+
# The name of the price.
|
|
1504
|
+
name:,
|
|
1505
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1506
|
+
# usage-based.
|
|
1507
|
+
billable_metric_id: nil,
|
|
1508
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1509
|
+
# this is true, and in-arrears if this is false.
|
|
1510
|
+
billed_in_advance: nil,
|
|
1511
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1512
|
+
# months.
|
|
1513
|
+
billing_cycle_configuration: nil,
|
|
1514
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1515
|
+
conversion_rate: nil,
|
|
1516
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1517
|
+
conversion_rate_config: nil,
|
|
1518
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1519
|
+
dimensional_price_configuration: nil,
|
|
1520
|
+
# An alias for the price.
|
|
1521
|
+
external_price_id: nil,
|
|
1522
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1523
|
+
# applied.
|
|
1524
|
+
fixed_price_quantity: nil,
|
|
1525
|
+
# The property used to group this price on an invoice
|
|
1526
|
+
invoice_grouping_key: nil,
|
|
1527
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1528
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1529
|
+
invoicing_cycle_configuration: nil,
|
|
1530
|
+
# The ID of the license type to associate with this price.
|
|
1531
|
+
license_type_id: nil,
|
|
1532
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1533
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1534
|
+
# by setting `metadata` to `null`.
|
|
1535
|
+
metadata: nil,
|
|
1536
|
+
# The pricing model type
|
|
1537
|
+
model_type: :grouped_with_min_max_thresholds
|
|
1538
|
+
)
|
|
1539
|
+
end
|
|
1540
|
+
|
|
1541
|
+
sig do
|
|
1542
|
+
override.returns(
|
|
1543
|
+
{
|
|
1544
|
+
cadence:
|
|
1545
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol,
|
|
1546
|
+
currency: String,
|
|
1547
|
+
grouped_with_min_max_thresholds_config:
|
|
1548
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig,
|
|
1549
|
+
item_id: String,
|
|
1550
|
+
model_type: Symbol,
|
|
1551
|
+
name: String,
|
|
1552
|
+
billable_metric_id: T.nilable(String),
|
|
1553
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1554
|
+
billing_cycle_configuration:
|
|
1555
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1556
|
+
conversion_rate: T.nilable(Float),
|
|
1557
|
+
conversion_rate_config:
|
|
1558
|
+
T.nilable(
|
|
1559
|
+
T.any(
|
|
1560
|
+
Orb::UnitConversionRateConfig,
|
|
1561
|
+
Orb::TieredConversionRateConfig
|
|
1562
|
+
)
|
|
1563
|
+
),
|
|
1564
|
+
dimensional_price_configuration:
|
|
1565
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration),
|
|
1566
|
+
external_price_id: T.nilable(String),
|
|
1567
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1568
|
+
invoice_grouping_key: T.nilable(String),
|
|
1569
|
+
invoicing_cycle_configuration:
|
|
1570
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1571
|
+
license_type_id: T.nilable(String),
|
|
1572
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)])
|
|
1573
|
+
}
|
|
1574
|
+
)
|
|
1575
|
+
end
|
|
1576
|
+
def to_hash
|
|
1577
|
+
end
|
|
1578
|
+
|
|
1579
|
+
# The cadence to bill for this price on.
|
|
1580
|
+
module Cadence
|
|
1581
|
+
extend Orb::Internal::Type::Enum
|
|
1582
|
+
|
|
1583
|
+
TaggedSymbol =
|
|
1584
|
+
T.type_alias do
|
|
1585
|
+
T.all(
|
|
1586
|
+
Symbol,
|
|
1587
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence
|
|
1588
|
+
)
|
|
1589
|
+
end
|
|
1590
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1591
|
+
|
|
1592
|
+
ANNUAL =
|
|
1593
|
+
T.let(
|
|
1594
|
+
:annual,
|
|
1595
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
1596
|
+
)
|
|
1597
|
+
SEMI_ANNUAL =
|
|
1598
|
+
T.let(
|
|
1599
|
+
:semi_annual,
|
|
1600
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
1601
|
+
)
|
|
1602
|
+
MONTHLY =
|
|
1603
|
+
T.let(
|
|
1604
|
+
:monthly,
|
|
1605
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
1606
|
+
)
|
|
1607
|
+
QUARTERLY =
|
|
1608
|
+
T.let(
|
|
1609
|
+
:quarterly,
|
|
1610
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
1611
|
+
)
|
|
1612
|
+
ONE_TIME =
|
|
1613
|
+
T.let(
|
|
1614
|
+
:one_time,
|
|
1615
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
1616
|
+
)
|
|
1617
|
+
CUSTOM =
|
|
1618
|
+
T.let(
|
|
1619
|
+
:custom,
|
|
1620
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
1621
|
+
)
|
|
1622
|
+
|
|
1623
|
+
sig do
|
|
1624
|
+
override.returns(
|
|
1625
|
+
T::Array[
|
|
1626
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
1627
|
+
]
|
|
1628
|
+
)
|
|
1629
|
+
end
|
|
1630
|
+
def self.values
|
|
1631
|
+
end
|
|
1632
|
+
end
|
|
1633
|
+
|
|
1634
|
+
class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel
|
|
1635
|
+
OrHash =
|
|
1636
|
+
T.type_alias do
|
|
1637
|
+
T.any(
|
|
1638
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig,
|
|
1639
|
+
Orb::Internal::AnyHash
|
|
1640
|
+
)
|
|
1641
|
+
end
|
|
1642
|
+
|
|
1643
|
+
# The event property used to group before applying thresholds
|
|
1644
|
+
sig { returns(String) }
|
|
1645
|
+
attr_accessor :grouping_key
|
|
1646
|
+
|
|
1647
|
+
# The maximum amount to charge each group
|
|
1648
|
+
sig { returns(String) }
|
|
1649
|
+
attr_accessor :maximum_charge
|
|
1650
|
+
|
|
1651
|
+
# The minimum amount to charge each group, regardless of usage
|
|
1652
|
+
sig { returns(String) }
|
|
1653
|
+
attr_accessor :minimum_charge
|
|
1654
|
+
|
|
1655
|
+
# The base price charged per group
|
|
1656
|
+
sig { returns(String) }
|
|
1657
|
+
attr_accessor :per_unit_rate
|
|
1658
|
+
|
|
1659
|
+
# Configuration for grouped_with_min_max_thresholds pricing
|
|
1660
|
+
sig do
|
|
1661
|
+
params(
|
|
1662
|
+
grouping_key: String,
|
|
1663
|
+
maximum_charge: String,
|
|
1664
|
+
minimum_charge: String,
|
|
1665
|
+
per_unit_rate: String
|
|
1666
|
+
).returns(T.attached_class)
|
|
1667
|
+
end
|
|
1668
|
+
def self.new(
|
|
1669
|
+
# The event property used to group before applying thresholds
|
|
1670
|
+
grouping_key:,
|
|
1671
|
+
# The maximum amount to charge each group
|
|
1672
|
+
maximum_charge:,
|
|
1673
|
+
# The minimum amount to charge each group, regardless of usage
|
|
1674
|
+
minimum_charge:,
|
|
1675
|
+
# The base price charged per group
|
|
1676
|
+
per_unit_rate:
|
|
1677
|
+
)
|
|
1678
|
+
end
|
|
1679
|
+
|
|
1680
|
+
sig do
|
|
1681
|
+
override.returns(
|
|
1682
|
+
{
|
|
1683
|
+
grouping_key: String,
|
|
1684
|
+
maximum_charge: String,
|
|
1685
|
+
minimum_charge: String,
|
|
1686
|
+
per_unit_rate: String
|
|
1687
|
+
}
|
|
1688
|
+
)
|
|
1689
|
+
end
|
|
1690
|
+
def to_hash
|
|
1691
|
+
end
|
|
1692
|
+
end
|
|
1693
|
+
end
|
|
1694
|
+
|
|
1695
|
+
class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel
|
|
1696
|
+
OrHash =
|
|
1697
|
+
T.type_alias do
|
|
1698
|
+
T.any(
|
|
1699
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation,
|
|
1700
|
+
Orb::Internal::AnyHash
|
|
1701
|
+
)
|
|
1702
|
+
end
|
|
1703
|
+
|
|
1704
|
+
# The cadence to bill for this price on.
|
|
1705
|
+
sig do
|
|
1706
|
+
returns(
|
|
1707
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::OrSymbol
|
|
1708
|
+
)
|
|
1709
|
+
end
|
|
1710
|
+
attr_accessor :cadence
|
|
1711
|
+
|
|
1712
|
+
# Configuration for cumulative_grouped_allocation pricing
|
|
1713
|
+
sig do
|
|
1714
|
+
returns(
|
|
1715
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig
|
|
1716
|
+
)
|
|
1717
|
+
end
|
|
1718
|
+
attr_reader :cumulative_grouped_allocation_config
|
|
1719
|
+
|
|
1720
|
+
sig do
|
|
1721
|
+
params(
|
|
1722
|
+
cumulative_grouped_allocation_config:
|
|
1723
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash
|
|
1724
|
+
).void
|
|
1725
|
+
end
|
|
1726
|
+
attr_writer :cumulative_grouped_allocation_config
|
|
1727
|
+
|
|
1728
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
1729
|
+
sig { returns(String) }
|
|
1730
|
+
attr_accessor :currency
|
|
1731
|
+
|
|
1732
|
+
# The id of the item the price will be associated with.
|
|
1733
|
+
sig { returns(String) }
|
|
1734
|
+
attr_accessor :item_id
|
|
1735
|
+
|
|
1736
|
+
# The pricing model type
|
|
1737
|
+
sig { returns(Symbol) }
|
|
1738
|
+
attr_accessor :model_type
|
|
1739
|
+
|
|
1740
|
+
# The name of the price.
|
|
1741
|
+
sig { returns(String) }
|
|
1742
|
+
attr_accessor :name
|
|
1743
|
+
|
|
1744
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1745
|
+
# usage-based.
|
|
1746
|
+
sig { returns(T.nilable(String)) }
|
|
1747
|
+
attr_accessor :billable_metric_id
|
|
1748
|
+
|
|
1749
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1750
|
+
# this is true, and in-arrears if this is false.
|
|
1751
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
1752
|
+
attr_accessor :billed_in_advance
|
|
1753
|
+
|
|
1754
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1755
|
+
# months.
|
|
1756
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1757
|
+
attr_reader :billing_cycle_configuration
|
|
1758
|
+
|
|
1759
|
+
sig do
|
|
1760
|
+
params(
|
|
1761
|
+
billing_cycle_configuration:
|
|
1762
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1763
|
+
).void
|
|
1764
|
+
end
|
|
1765
|
+
attr_writer :billing_cycle_configuration
|
|
1766
|
+
|
|
1767
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1768
|
+
sig { returns(T.nilable(Float)) }
|
|
1769
|
+
attr_accessor :conversion_rate
|
|
1770
|
+
|
|
1771
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1772
|
+
sig do
|
|
1773
|
+
returns(
|
|
1774
|
+
T.nilable(
|
|
1775
|
+
T.any(
|
|
1776
|
+
Orb::UnitConversionRateConfig,
|
|
1777
|
+
Orb::TieredConversionRateConfig
|
|
1778
|
+
)
|
|
1779
|
+
)
|
|
1780
|
+
)
|
|
1781
|
+
end
|
|
1782
|
+
attr_accessor :conversion_rate_config
|
|
1783
|
+
|
|
1784
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1785
|
+
sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
|
|
1786
|
+
attr_reader :dimensional_price_configuration
|
|
1787
|
+
|
|
1788
|
+
sig do
|
|
1789
|
+
params(
|
|
1790
|
+
dimensional_price_configuration:
|
|
1791
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
|
|
1792
|
+
).void
|
|
1793
|
+
end
|
|
1794
|
+
attr_writer :dimensional_price_configuration
|
|
1795
|
+
|
|
1796
|
+
# An alias for the price.
|
|
1797
|
+
sig { returns(T.nilable(String)) }
|
|
1798
|
+
attr_accessor :external_price_id
|
|
1799
|
+
|
|
1800
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1801
|
+
# applied.
|
|
1802
|
+
sig { returns(T.nilable(Float)) }
|
|
1803
|
+
attr_accessor :fixed_price_quantity
|
|
1804
|
+
|
|
1805
|
+
# The property used to group this price on an invoice
|
|
1806
|
+
sig { returns(T.nilable(String)) }
|
|
1807
|
+
attr_accessor :invoice_grouping_key
|
|
1808
|
+
|
|
1809
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1810
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1811
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1812
|
+
attr_reader :invoicing_cycle_configuration
|
|
1813
|
+
|
|
1814
|
+
sig do
|
|
1815
|
+
params(
|
|
1816
|
+
invoicing_cycle_configuration:
|
|
1817
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1818
|
+
).void
|
|
1819
|
+
end
|
|
1820
|
+
attr_writer :invoicing_cycle_configuration
|
|
1821
|
+
|
|
1822
|
+
# The ID of the license type to associate with this price.
|
|
1823
|
+
sig { returns(T.nilable(String)) }
|
|
1824
|
+
attr_accessor :license_type_id
|
|
1825
|
+
|
|
1826
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1827
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1828
|
+
# by setting `metadata` to `null`.
|
|
1829
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
1830
|
+
attr_accessor :metadata
|
|
1831
|
+
|
|
1832
|
+
sig do
|
|
1833
|
+
params(
|
|
1834
|
+
cadence:
|
|
1835
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::OrSymbol,
|
|
1836
|
+
cumulative_grouped_allocation_config:
|
|
1837
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash,
|
|
1838
|
+
currency: String,
|
|
1839
|
+
item_id: String,
|
|
1840
|
+
name: String,
|
|
1841
|
+
billable_metric_id: T.nilable(String),
|
|
1842
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1843
|
+
billing_cycle_configuration:
|
|
1844
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1845
|
+
conversion_rate: T.nilable(Float),
|
|
1846
|
+
conversion_rate_config:
|
|
1847
|
+
T.nilable(
|
|
1848
|
+
T.any(
|
|
1849
|
+
Orb::UnitConversionRateConfig::OrHash,
|
|
1850
|
+
Orb::TieredConversionRateConfig::OrHash
|
|
1851
|
+
)
|
|
1852
|
+
),
|
|
1853
|
+
dimensional_price_configuration:
|
|
1854
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
|
|
1855
|
+
external_price_id: T.nilable(String),
|
|
1856
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1857
|
+
invoice_grouping_key: T.nilable(String),
|
|
1858
|
+
invoicing_cycle_configuration:
|
|
1859
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1860
|
+
license_type_id: T.nilable(String),
|
|
1861
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
1862
|
+
model_type: Symbol
|
|
1863
|
+
).returns(T.attached_class)
|
|
1864
|
+
end
|
|
1865
|
+
def self.new(
|
|
1866
|
+
# The cadence to bill for this price on.
|
|
1867
|
+
cadence:,
|
|
1868
|
+
# Configuration for cumulative_grouped_allocation pricing
|
|
1869
|
+
cumulative_grouped_allocation_config:,
|
|
1870
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
1871
|
+
currency:,
|
|
1872
|
+
# The id of the item the price will be associated with.
|
|
1873
|
+
item_id:,
|
|
1874
|
+
# The name of the price.
|
|
1875
|
+
name:,
|
|
1876
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1877
|
+
# usage-based.
|
|
1878
|
+
billable_metric_id: nil,
|
|
1879
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1880
|
+
# this is true, and in-arrears if this is false.
|
|
1881
|
+
billed_in_advance: nil,
|
|
1882
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1883
|
+
# months.
|
|
1884
|
+
billing_cycle_configuration: nil,
|
|
1885
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1886
|
+
conversion_rate: nil,
|
|
1887
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1888
|
+
conversion_rate_config: nil,
|
|
1889
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1890
|
+
dimensional_price_configuration: nil,
|
|
1891
|
+
# An alias for the price.
|
|
1892
|
+
external_price_id: nil,
|
|
1893
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1894
|
+
# applied.
|
|
1895
|
+
fixed_price_quantity: nil,
|
|
1896
|
+
# The property used to group this price on an invoice
|
|
1897
|
+
invoice_grouping_key: nil,
|
|
1898
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1899
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1900
|
+
invoicing_cycle_configuration: nil,
|
|
1901
|
+
# The ID of the license type to associate with this price.
|
|
1902
|
+
license_type_id: nil,
|
|
1903
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1904
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1905
|
+
# by setting `metadata` to `null`.
|
|
1906
|
+
metadata: nil,
|
|
1907
|
+
# The pricing model type
|
|
1908
|
+
model_type: :cumulative_grouped_allocation
|
|
1909
|
+
)
|
|
1910
|
+
end
|
|
1911
|
+
|
|
1912
|
+
sig do
|
|
1913
|
+
override.returns(
|
|
1914
|
+
{
|
|
1915
|
+
cadence:
|
|
1916
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::OrSymbol,
|
|
1917
|
+
cumulative_grouped_allocation_config:
|
|
1918
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig,
|
|
1919
|
+
currency: String,
|
|
1920
|
+
item_id: String,
|
|
1921
|
+
model_type: Symbol,
|
|
1922
|
+
name: String,
|
|
1923
|
+
billable_metric_id: T.nilable(String),
|
|
1924
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1925
|
+
billing_cycle_configuration:
|
|
1926
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1927
|
+
conversion_rate: T.nilable(Float),
|
|
1928
|
+
conversion_rate_config:
|
|
1929
|
+
T.nilable(
|
|
1930
|
+
T.any(
|
|
1931
|
+
Orb::UnitConversionRateConfig,
|
|
1932
|
+
Orb::TieredConversionRateConfig
|
|
1933
|
+
)
|
|
1934
|
+
),
|
|
1935
|
+
dimensional_price_configuration:
|
|
1936
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration),
|
|
1937
|
+
external_price_id: T.nilable(String),
|
|
1938
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1939
|
+
invoice_grouping_key: T.nilable(String),
|
|
1940
|
+
invoicing_cycle_configuration:
|
|
1941
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1942
|
+
license_type_id: T.nilable(String),
|
|
1943
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)])
|
|
1944
|
+
}
|
|
1945
|
+
)
|
|
1946
|
+
end
|
|
1947
|
+
def to_hash
|
|
1948
|
+
end
|
|
1949
|
+
|
|
1950
|
+
# The cadence to bill for this price on.
|
|
1951
|
+
module Cadence
|
|
1952
|
+
extend Orb::Internal::Type::Enum
|
|
1953
|
+
|
|
1954
|
+
TaggedSymbol =
|
|
1955
|
+
T.type_alias do
|
|
1956
|
+
T.all(
|
|
1957
|
+
Symbol,
|
|
1958
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence
|
|
1959
|
+
)
|
|
1960
|
+
end
|
|
1961
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1962
|
+
|
|
1963
|
+
ANNUAL =
|
|
1964
|
+
T.let(
|
|
1965
|
+
:annual,
|
|
1966
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
1967
|
+
)
|
|
1968
|
+
SEMI_ANNUAL =
|
|
1969
|
+
T.let(
|
|
1970
|
+
:semi_annual,
|
|
1971
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
1972
|
+
)
|
|
1973
|
+
MONTHLY =
|
|
1974
|
+
T.let(
|
|
1975
|
+
:monthly,
|
|
1976
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
1977
|
+
)
|
|
1978
|
+
QUARTERLY =
|
|
1979
|
+
T.let(
|
|
1980
|
+
:quarterly,
|
|
1981
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
1982
|
+
)
|
|
1983
|
+
ONE_TIME =
|
|
1984
|
+
T.let(
|
|
1985
|
+
:one_time,
|
|
1986
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
1987
|
+
)
|
|
1988
|
+
CUSTOM =
|
|
1989
|
+
T.let(
|
|
1990
|
+
:custom,
|
|
1991
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
1992
|
+
)
|
|
1993
|
+
|
|
1994
|
+
sig do
|
|
1995
|
+
override.returns(
|
|
1996
|
+
T::Array[
|
|
1997
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
1998
|
+
]
|
|
1999
|
+
)
|
|
2000
|
+
end
|
|
2001
|
+
def self.values
|
|
2002
|
+
end
|
|
2003
|
+
end
|
|
2004
|
+
|
|
2005
|
+
class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel
|
|
2006
|
+
OrHash =
|
|
2007
|
+
T.type_alias do
|
|
2008
|
+
T.any(
|
|
2009
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig,
|
|
2010
|
+
Orb::Internal::AnyHash
|
|
2011
|
+
)
|
|
2012
|
+
end
|
|
2013
|
+
|
|
2014
|
+
# The overall allocation across all groups
|
|
2015
|
+
sig { returns(String) }
|
|
2016
|
+
attr_accessor :cumulative_allocation
|
|
2017
|
+
|
|
2018
|
+
# The allocation per individual group
|
|
2019
|
+
sig { returns(String) }
|
|
2020
|
+
attr_accessor :group_allocation
|
|
2021
|
+
|
|
2022
|
+
# The event property used to group usage before applying allocations
|
|
2023
|
+
sig { returns(String) }
|
|
2024
|
+
attr_accessor :grouping_key
|
|
2025
|
+
|
|
2026
|
+
# The amount to charge for each unit outside of the allocation
|
|
2027
|
+
sig { returns(String) }
|
|
2028
|
+
attr_accessor :unit_amount
|
|
2029
|
+
|
|
2030
|
+
# Configuration for cumulative_grouped_allocation pricing
|
|
2031
|
+
sig do
|
|
2032
|
+
params(
|
|
2033
|
+
cumulative_allocation: String,
|
|
2034
|
+
group_allocation: String,
|
|
2035
|
+
grouping_key: String,
|
|
2036
|
+
unit_amount: String
|
|
2037
|
+
).returns(T.attached_class)
|
|
2038
|
+
end
|
|
2039
|
+
def self.new(
|
|
2040
|
+
# The overall allocation across all groups
|
|
2041
|
+
cumulative_allocation:,
|
|
2042
|
+
# The allocation per individual group
|
|
2043
|
+
group_allocation:,
|
|
2044
|
+
# The event property used to group usage before applying allocations
|
|
2045
|
+
grouping_key:,
|
|
2046
|
+
# The amount to charge for each unit outside of the allocation
|
|
2047
|
+
unit_amount:
|
|
2048
|
+
)
|
|
2049
|
+
end
|
|
2050
|
+
|
|
2051
|
+
sig do
|
|
2052
|
+
override.returns(
|
|
2053
|
+
{
|
|
2054
|
+
cumulative_allocation: String,
|
|
2055
|
+
group_allocation: String,
|
|
2056
|
+
grouping_key: String,
|
|
2057
|
+
unit_amount: String
|
|
2058
|
+
}
|
|
2059
|
+
)
|
|
2060
|
+
end
|
|
2061
|
+
def to_hash
|
|
2062
|
+
end
|
|
2063
|
+
end
|
|
2064
|
+
end
|
|
2065
|
+
|
|
2066
|
+
class DailyCreditAllowance < Orb::Internal::Type::BaseModel
|
|
2067
|
+
OrHash =
|
|
2068
|
+
T.type_alias do
|
|
2069
|
+
T.any(
|
|
2070
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance,
|
|
790
2071
|
Orb::Internal::AnyHash
|
|
791
2072
|
)
|
|
792
2073
|
end
|
|
@@ -794,7 +2075,7 @@ module Orb
|
|
|
794
2075
|
# The cadence to bill for this price on.
|
|
795
2076
|
sig do
|
|
796
2077
|
returns(
|
|
797
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2078
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol
|
|
798
2079
|
)
|
|
799
2080
|
end
|
|
800
2081
|
attr_accessor :cadence
|
|
@@ -803,21 +2084,21 @@ module Orb
|
|
|
803
2084
|
sig { returns(String) }
|
|
804
2085
|
attr_accessor :currency
|
|
805
2086
|
|
|
806
|
-
# Configuration for
|
|
2087
|
+
# Configuration for daily_credit_allowance pricing
|
|
807
2088
|
sig do
|
|
808
2089
|
returns(
|
|
809
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2090
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig
|
|
810
2091
|
)
|
|
811
2092
|
end
|
|
812
|
-
attr_reader :
|
|
2093
|
+
attr_reader :daily_credit_allowance_config
|
|
813
2094
|
|
|
814
2095
|
sig do
|
|
815
2096
|
params(
|
|
816
|
-
|
|
817
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2097
|
+
daily_credit_allowance_config:
|
|
2098
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash
|
|
818
2099
|
).void
|
|
819
2100
|
end
|
|
820
|
-
attr_writer :
|
|
2101
|
+
attr_writer :daily_credit_allowance_config
|
|
821
2102
|
|
|
822
2103
|
# The id of the item the price will be associated with.
|
|
823
2104
|
sig { returns(String) }
|
|
@@ -922,10 +2203,10 @@ module Orb
|
|
|
922
2203
|
sig do
|
|
923
2204
|
params(
|
|
924
2205
|
cadence:
|
|
925
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2206
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol,
|
|
926
2207
|
currency: String,
|
|
927
|
-
|
|
928
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2208
|
+
daily_credit_allowance_config:
|
|
2209
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash,
|
|
929
2210
|
item_id: String,
|
|
930
2211
|
name: String,
|
|
931
2212
|
billable_metric_id: T.nilable(String),
|
|
@@ -957,8 +2238,8 @@ module Orb
|
|
|
957
2238
|
cadence:,
|
|
958
2239
|
# An ISO 4217 currency string for which this price is billed in.
|
|
959
2240
|
currency:,
|
|
960
|
-
# Configuration for
|
|
961
|
-
|
|
2241
|
+
# Configuration for daily_credit_allowance pricing
|
|
2242
|
+
daily_credit_allowance_config:,
|
|
962
2243
|
# The id of the item the price will be associated with.
|
|
963
2244
|
item_id:,
|
|
964
2245
|
# The name of the price.
|
|
@@ -995,7 +2276,7 @@ module Orb
|
|
|
995
2276
|
# by setting `metadata` to `null`.
|
|
996
2277
|
metadata: nil,
|
|
997
2278
|
# The pricing model type
|
|
998
|
-
model_type: :
|
|
2279
|
+
model_type: :daily_credit_allowance
|
|
999
2280
|
)
|
|
1000
2281
|
end
|
|
1001
2282
|
|
|
@@ -1003,10 +2284,10 @@ module Orb
|
|
|
1003
2284
|
override.returns(
|
|
1004
2285
|
{
|
|
1005
2286
|
cadence:
|
|
1006
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2287
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol,
|
|
1007
2288
|
currency: String,
|
|
1008
|
-
|
|
1009
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2289
|
+
daily_credit_allowance_config:
|
|
2290
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig,
|
|
1010
2291
|
item_id: String,
|
|
1011
2292
|
model_type: Symbol,
|
|
1012
2293
|
name: String,
|
|
@@ -1045,7 +2326,7 @@ module Orb
|
|
|
1045
2326
|
T.type_alias do
|
|
1046
2327
|
T.all(
|
|
1047
2328
|
Symbol,
|
|
1048
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2329
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence
|
|
1049
2330
|
)
|
|
1050
2331
|
end
|
|
1051
2332
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -1053,38 +2334,38 @@ module Orb
|
|
|
1053
2334
|
ANNUAL =
|
|
1054
2335
|
T.let(
|
|
1055
2336
|
:annual,
|
|
1056
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2337
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol
|
|
1057
2338
|
)
|
|
1058
2339
|
SEMI_ANNUAL =
|
|
1059
2340
|
T.let(
|
|
1060
2341
|
:semi_annual,
|
|
1061
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2342
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol
|
|
1062
2343
|
)
|
|
1063
2344
|
MONTHLY =
|
|
1064
2345
|
T.let(
|
|
1065
2346
|
:monthly,
|
|
1066
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2347
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol
|
|
1067
2348
|
)
|
|
1068
2349
|
QUARTERLY =
|
|
1069
2350
|
T.let(
|
|
1070
2351
|
:quarterly,
|
|
1071
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2352
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol
|
|
1072
2353
|
)
|
|
1073
2354
|
ONE_TIME =
|
|
1074
2355
|
T.let(
|
|
1075
2356
|
:one_time,
|
|
1076
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2357
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol
|
|
1077
2358
|
)
|
|
1078
2359
|
CUSTOM =
|
|
1079
2360
|
T.let(
|
|
1080
2361
|
:custom,
|
|
1081
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2362
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol
|
|
1082
2363
|
)
|
|
1083
2364
|
|
|
1084
2365
|
sig do
|
|
1085
2366
|
override.returns(
|
|
1086
2367
|
T::Array[
|
|
1087
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2368
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol
|
|
1088
2369
|
]
|
|
1089
2370
|
)
|
|
1090
2371
|
end
|
|
@@ -1092,72 +2373,144 @@ module Orb
|
|
|
1092
2373
|
end
|
|
1093
2374
|
end
|
|
1094
2375
|
|
|
1095
|
-
class
|
|
2376
|
+
class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel
|
|
1096
2377
|
OrHash =
|
|
1097
2378
|
T.type_alias do
|
|
1098
2379
|
T.any(
|
|
1099
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2380
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig,
|
|
1100
2381
|
Orb::Internal::AnyHash
|
|
1101
2382
|
)
|
|
1102
2383
|
end
|
|
1103
2384
|
|
|
1104
|
-
#
|
|
2385
|
+
# Credits granted per day. Lose-it-or-use-it; does not roll over.
|
|
1105
2386
|
sig { returns(String) }
|
|
1106
|
-
attr_accessor :
|
|
2387
|
+
attr_accessor :daily_allowance
|
|
1107
2388
|
|
|
1108
|
-
#
|
|
2389
|
+
# Default per-unit credit rate for any usage not bucketed into a specified
|
|
2390
|
+
# matrix_value
|
|
1109
2391
|
sig { returns(String) }
|
|
1110
|
-
attr_accessor :
|
|
2392
|
+
attr_accessor :default_unit_amount
|
|
1111
2393
|
|
|
1112
|
-
#
|
|
1113
|
-
sig { returns(String) }
|
|
1114
|
-
attr_accessor :
|
|
2394
|
+
# One or two event property values to evaluate matrix groups by
|
|
2395
|
+
sig { returns(T::Array[T.nilable(String)]) }
|
|
2396
|
+
attr_accessor :dimensions
|
|
1115
2397
|
|
|
1116
|
-
#
|
|
2398
|
+
# Event property whose value identifies the day bucket the event belongs to (e.g.
|
|
2399
|
+
# 'event_day' set to an ISO date string in the customer's timezone). The allowance
|
|
2400
|
+
# resets per distinct value of this property.
|
|
1117
2401
|
sig { returns(String) }
|
|
1118
|
-
attr_accessor :
|
|
2402
|
+
attr_accessor :event_day_property
|
|
1119
2403
|
|
|
1120
|
-
#
|
|
2404
|
+
# Per-dimension credit rates
|
|
2405
|
+
sig do
|
|
2406
|
+
returns(
|
|
2407
|
+
T::Array[
|
|
2408
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue
|
|
2409
|
+
]
|
|
2410
|
+
)
|
|
2411
|
+
end
|
|
2412
|
+
attr_accessor :matrix_values
|
|
2413
|
+
|
|
2414
|
+
# Configuration for daily_credit_allowance pricing
|
|
1121
2415
|
sig do
|
|
1122
2416
|
params(
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
2417
|
+
daily_allowance: String,
|
|
2418
|
+
default_unit_amount: String,
|
|
2419
|
+
dimensions: T::Array[T.nilable(String)],
|
|
2420
|
+
event_day_property: String,
|
|
2421
|
+
matrix_values:
|
|
2422
|
+
T::Array[
|
|
2423
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash
|
|
2424
|
+
]
|
|
1127
2425
|
).returns(T.attached_class)
|
|
1128
2426
|
end
|
|
1129
2427
|
def self.new(
|
|
1130
|
-
#
|
|
1131
|
-
|
|
1132
|
-
#
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
2428
|
+
# Credits granted per day. Lose-it-or-use-it; does not roll over.
|
|
2429
|
+
daily_allowance:,
|
|
2430
|
+
# Default per-unit credit rate for any usage not bucketed into a specified
|
|
2431
|
+
# matrix_value
|
|
2432
|
+
default_unit_amount:,
|
|
2433
|
+
# One or two event property values to evaluate matrix groups by
|
|
2434
|
+
dimensions:,
|
|
2435
|
+
# Event property whose value identifies the day bucket the event belongs to (e.g.
|
|
2436
|
+
# 'event_day' set to an ISO date string in the customer's timezone). The allowance
|
|
2437
|
+
# resets per distinct value of this property.
|
|
2438
|
+
event_day_property:,
|
|
2439
|
+
# Per-dimension credit rates
|
|
2440
|
+
matrix_values:
|
|
1138
2441
|
)
|
|
1139
2442
|
end
|
|
1140
2443
|
|
|
1141
2444
|
sig do
|
|
1142
2445
|
override.returns(
|
|
1143
2446
|
{
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
2447
|
+
daily_allowance: String,
|
|
2448
|
+
default_unit_amount: String,
|
|
2449
|
+
dimensions: T::Array[T.nilable(String)],
|
|
2450
|
+
event_day_property: String,
|
|
2451
|
+
matrix_values:
|
|
2452
|
+
T::Array[
|
|
2453
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue
|
|
2454
|
+
]
|
|
1148
2455
|
}
|
|
1149
2456
|
)
|
|
1150
2457
|
end
|
|
1151
2458
|
def to_hash
|
|
1152
2459
|
end
|
|
2460
|
+
|
|
2461
|
+
class MatrixValue < Orb::Internal::Type::BaseModel
|
|
2462
|
+
OrHash =
|
|
2463
|
+
T.type_alias do
|
|
2464
|
+
T.any(
|
|
2465
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue,
|
|
2466
|
+
Orb::Internal::AnyHash
|
|
2467
|
+
)
|
|
2468
|
+
end
|
|
2469
|
+
|
|
2470
|
+
# One or two matrix keys to filter usage to this value by. For example, ["model"]
|
|
2471
|
+
# could be used to apply a different credit rate to each AI model.
|
|
2472
|
+
sig { returns(T::Array[T.nilable(String)]) }
|
|
2473
|
+
attr_accessor :dimension_values
|
|
2474
|
+
|
|
2475
|
+
# Credits charged per unit of usage matching the specified dimension_values
|
|
2476
|
+
sig { returns(String) }
|
|
2477
|
+
attr_accessor :unit_amount
|
|
2478
|
+
|
|
2479
|
+
# Per-dimension credit price for the daily credit allowance model.
|
|
2480
|
+
sig do
|
|
2481
|
+
params(
|
|
2482
|
+
dimension_values: T::Array[T.nilable(String)],
|
|
2483
|
+
unit_amount: String
|
|
2484
|
+
).returns(T.attached_class)
|
|
2485
|
+
end
|
|
2486
|
+
def self.new(
|
|
2487
|
+
# One or two matrix keys to filter usage to this value by. For example, ["model"]
|
|
2488
|
+
# could be used to apply a different credit rate to each AI model.
|
|
2489
|
+
dimension_values:,
|
|
2490
|
+
# Credits charged per unit of usage matching the specified dimension_values
|
|
2491
|
+
unit_amount:
|
|
2492
|
+
)
|
|
2493
|
+
end
|
|
2494
|
+
|
|
2495
|
+
sig do
|
|
2496
|
+
override.returns(
|
|
2497
|
+
{
|
|
2498
|
+
dimension_values: T::Array[T.nilable(String)],
|
|
2499
|
+
unit_amount: String
|
|
2500
|
+
}
|
|
2501
|
+
)
|
|
2502
|
+
end
|
|
2503
|
+
def to_hash
|
|
2504
|
+
end
|
|
2505
|
+
end
|
|
1153
2506
|
end
|
|
1154
2507
|
end
|
|
1155
2508
|
|
|
1156
|
-
class
|
|
2509
|
+
class MeteredAllowance < Orb::Internal::Type::BaseModel
|
|
1157
2510
|
OrHash =
|
|
1158
2511
|
T.type_alias do
|
|
1159
2512
|
T.any(
|
|
1160
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2513
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance,
|
|
1161
2514
|
Orb::Internal::AnyHash
|
|
1162
2515
|
)
|
|
1163
2516
|
end
|
|
@@ -1165,34 +2518,34 @@ module Orb
|
|
|
1165
2518
|
# The cadence to bill for this price on.
|
|
1166
2519
|
sig do
|
|
1167
2520
|
returns(
|
|
1168
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2521
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol
|
|
1169
2522
|
)
|
|
1170
2523
|
end
|
|
1171
2524
|
attr_accessor :cadence
|
|
1172
2525
|
|
|
1173
|
-
#
|
|
2526
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
2527
|
+
sig { returns(String) }
|
|
2528
|
+
attr_accessor :currency
|
|
2529
|
+
|
|
2530
|
+
# The id of the item the price will be associated with.
|
|
2531
|
+
sig { returns(String) }
|
|
2532
|
+
attr_accessor :item_id
|
|
2533
|
+
|
|
2534
|
+
# Configuration for metered_allowance pricing
|
|
1174
2535
|
sig do
|
|
1175
2536
|
returns(
|
|
1176
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2537
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig
|
|
1177
2538
|
)
|
|
1178
2539
|
end
|
|
1179
|
-
attr_reader :
|
|
2540
|
+
attr_reader :metered_allowance_config
|
|
1180
2541
|
|
|
1181
2542
|
sig do
|
|
1182
2543
|
params(
|
|
1183
|
-
|
|
1184
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2544
|
+
metered_allowance_config:
|
|
2545
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash
|
|
1185
2546
|
).void
|
|
1186
2547
|
end
|
|
1187
|
-
attr_writer :
|
|
1188
|
-
|
|
1189
|
-
# An ISO 4217 currency string for which this price is billed in.
|
|
1190
|
-
sig { returns(String) }
|
|
1191
|
-
attr_accessor :currency
|
|
1192
|
-
|
|
1193
|
-
# The id of the item the price will be associated with.
|
|
1194
|
-
sig { returns(String) }
|
|
1195
|
-
attr_accessor :item_id
|
|
2548
|
+
attr_writer :metered_allowance_config
|
|
1196
2549
|
|
|
1197
2550
|
# The pricing model type
|
|
1198
2551
|
sig { returns(Symbol) }
|
|
@@ -1293,11 +2646,11 @@ module Orb
|
|
|
1293
2646
|
sig do
|
|
1294
2647
|
params(
|
|
1295
2648
|
cadence:
|
|
1296
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
1297
|
-
cumulative_grouped_allocation_config:
|
|
1298
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash,
|
|
2649
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol,
|
|
1299
2650
|
currency: String,
|
|
1300
2651
|
item_id: String,
|
|
2652
|
+
metered_allowance_config:
|
|
2653
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash,
|
|
1301
2654
|
name: String,
|
|
1302
2655
|
billable_metric_id: T.nilable(String),
|
|
1303
2656
|
billed_in_advance: T.nilable(T::Boolean),
|
|
@@ -1326,12 +2679,12 @@ module Orb
|
|
|
1326
2679
|
def self.new(
|
|
1327
2680
|
# The cadence to bill for this price on.
|
|
1328
2681
|
cadence:,
|
|
1329
|
-
# Configuration for cumulative_grouped_allocation pricing
|
|
1330
|
-
cumulative_grouped_allocation_config:,
|
|
1331
2682
|
# An ISO 4217 currency string for which this price is billed in.
|
|
1332
2683
|
currency:,
|
|
1333
2684
|
# The id of the item the price will be associated with.
|
|
1334
2685
|
item_id:,
|
|
2686
|
+
# Configuration for metered_allowance pricing
|
|
2687
|
+
metered_allowance_config:,
|
|
1335
2688
|
# The name of the price.
|
|
1336
2689
|
name:,
|
|
1337
2690
|
# The id of the billable metric for the price. Only needed if the price is
|
|
@@ -1366,7 +2719,7 @@ module Orb
|
|
|
1366
2719
|
# by setting `metadata` to `null`.
|
|
1367
2720
|
metadata: nil,
|
|
1368
2721
|
# The pricing model type
|
|
1369
|
-
model_type: :
|
|
2722
|
+
model_type: :metered_allowance
|
|
1370
2723
|
)
|
|
1371
2724
|
end
|
|
1372
2725
|
|
|
@@ -1374,11 +2727,11 @@ module Orb
|
|
|
1374
2727
|
override.returns(
|
|
1375
2728
|
{
|
|
1376
2729
|
cadence:
|
|
1377
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
1378
|
-
cumulative_grouped_allocation_config:
|
|
1379
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig,
|
|
2730
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol,
|
|
1380
2731
|
currency: String,
|
|
1381
2732
|
item_id: String,
|
|
2733
|
+
metered_allowance_config:
|
|
2734
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig,
|
|
1382
2735
|
model_type: Symbol,
|
|
1383
2736
|
name: String,
|
|
1384
2737
|
billable_metric_id: T.nilable(String),
|
|
@@ -1416,7 +2769,7 @@ module Orb
|
|
|
1416
2769
|
T.type_alias do
|
|
1417
2770
|
T.all(
|
|
1418
2771
|
Symbol,
|
|
1419
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2772
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence
|
|
1420
2773
|
)
|
|
1421
2774
|
end
|
|
1422
2775
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -1424,38 +2777,38 @@ module Orb
|
|
|
1424
2777
|
ANNUAL =
|
|
1425
2778
|
T.let(
|
|
1426
2779
|
:annual,
|
|
1427
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2780
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol
|
|
1428
2781
|
)
|
|
1429
2782
|
SEMI_ANNUAL =
|
|
1430
2783
|
T.let(
|
|
1431
2784
|
:semi_annual,
|
|
1432
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2785
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol
|
|
1433
2786
|
)
|
|
1434
2787
|
MONTHLY =
|
|
1435
2788
|
T.let(
|
|
1436
2789
|
:monthly,
|
|
1437
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2790
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol
|
|
1438
2791
|
)
|
|
1439
2792
|
QUARTERLY =
|
|
1440
2793
|
T.let(
|
|
1441
2794
|
:quarterly,
|
|
1442
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2795
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol
|
|
1443
2796
|
)
|
|
1444
2797
|
ONE_TIME =
|
|
1445
2798
|
T.let(
|
|
1446
2799
|
:one_time,
|
|
1447
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2800
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol
|
|
1448
2801
|
)
|
|
1449
2802
|
CUSTOM =
|
|
1450
2803
|
T.let(
|
|
1451
2804
|
:custom,
|
|
1452
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2805
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol
|
|
1453
2806
|
)
|
|
1454
2807
|
|
|
1455
2808
|
sig do
|
|
1456
2809
|
override.returns(
|
|
1457
2810
|
T::Array[
|
|
1458
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2811
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol
|
|
1459
2812
|
]
|
|
1460
2813
|
)
|
|
1461
2814
|
end
|
|
@@ -1463,59 +2816,91 @@ module Orb
|
|
|
1463
2816
|
end
|
|
1464
2817
|
end
|
|
1465
2818
|
|
|
1466
|
-
class
|
|
2819
|
+
class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel
|
|
1467
2820
|
OrHash =
|
|
1468
2821
|
T.type_alias do
|
|
1469
2822
|
T.any(
|
|
1470
|
-
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::
|
|
2823
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig,
|
|
1471
2824
|
Orb::Internal::AnyHash
|
|
1472
2825
|
)
|
|
1473
2826
|
end
|
|
1474
2827
|
|
|
1475
|
-
# The
|
|
2828
|
+
# The grouping_key value whose summed quantity represents the allowance for this
|
|
2829
|
+
# period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
|
|
2830
|
+
# — credit can never exceed actual usage.
|
|
1476
2831
|
sig { returns(String) }
|
|
1477
|
-
attr_accessor :
|
|
2832
|
+
attr_accessor :allowance_grouping_value
|
|
1478
2833
|
|
|
1479
|
-
# The
|
|
2834
|
+
# The grouping_key value whose summed quantity represents consumption (e.g.
|
|
2835
|
+
# 'download'). Charged at unit_amount.
|
|
1480
2836
|
sig { returns(String) }
|
|
1481
|
-
attr_accessor :
|
|
2837
|
+
attr_accessor :consumption_grouping_value
|
|
1482
2838
|
|
|
1483
|
-
#
|
|
2839
|
+
# Event property used to partition the metric into consumption and allowance
|
|
2840
|
+
# quantities (e.g. 'event_name'). The metric is queried with this key and the two
|
|
2841
|
+
# values below select which partition is which.
|
|
1484
2842
|
sig { returns(String) }
|
|
1485
2843
|
attr_accessor :grouping_key
|
|
1486
2844
|
|
|
1487
|
-
#
|
|
2845
|
+
# Per-unit price applied to gross consumption and to the allowance credit.
|
|
1488
2846
|
sig { returns(String) }
|
|
1489
2847
|
attr_accessor :unit_amount
|
|
1490
2848
|
|
|
1491
|
-
#
|
|
2849
|
+
# Sub-line label for the credit row (e.g. 'Up to 3x free egress').
|
|
2850
|
+
sig { returns(T.nilable(String)) }
|
|
2851
|
+
attr_reader :allowance_display_name
|
|
2852
|
+
|
|
2853
|
+
sig { params(allowance_display_name: String).void }
|
|
2854
|
+
attr_writer :allowance_display_name
|
|
2855
|
+
|
|
2856
|
+
# Sub-line label for the gross consumption row (e.g. 'bytes gotten').
|
|
2857
|
+
sig { returns(T.nilable(String)) }
|
|
2858
|
+
attr_reader :consumption_display_name
|
|
2859
|
+
|
|
2860
|
+
sig { params(consumption_display_name: String).void }
|
|
2861
|
+
attr_writer :consumption_display_name
|
|
2862
|
+
|
|
2863
|
+
# Configuration for metered_allowance pricing
|
|
1492
2864
|
sig do
|
|
1493
2865
|
params(
|
|
1494
|
-
|
|
1495
|
-
|
|
2866
|
+
allowance_grouping_value: String,
|
|
2867
|
+
consumption_grouping_value: String,
|
|
1496
2868
|
grouping_key: String,
|
|
1497
|
-
unit_amount: String
|
|
2869
|
+
unit_amount: String,
|
|
2870
|
+
allowance_display_name: String,
|
|
2871
|
+
consumption_display_name: String
|
|
1498
2872
|
).returns(T.attached_class)
|
|
1499
2873
|
end
|
|
1500
2874
|
def self.new(
|
|
1501
|
-
# The
|
|
1502
|
-
|
|
1503
|
-
#
|
|
1504
|
-
|
|
1505
|
-
# The
|
|
2875
|
+
# The grouping_key value whose summed quantity represents the allowance for this
|
|
2876
|
+
# period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
|
|
2877
|
+
# — credit can never exceed actual usage.
|
|
2878
|
+
allowance_grouping_value:,
|
|
2879
|
+
# The grouping_key value whose summed quantity represents consumption (e.g.
|
|
2880
|
+
# 'download'). Charged at unit_amount.
|
|
2881
|
+
consumption_grouping_value:,
|
|
2882
|
+
# Event property used to partition the metric into consumption and allowance
|
|
2883
|
+
# quantities (e.g. 'event_name'). The metric is queried with this key and the two
|
|
2884
|
+
# values below select which partition is which.
|
|
1506
2885
|
grouping_key:,
|
|
1507
|
-
#
|
|
1508
|
-
unit_amount
|
|
2886
|
+
# Per-unit price applied to gross consumption and to the allowance credit.
|
|
2887
|
+
unit_amount:,
|
|
2888
|
+
# Sub-line label for the credit row (e.g. 'Up to 3x free egress').
|
|
2889
|
+
allowance_display_name: nil,
|
|
2890
|
+
# Sub-line label for the gross consumption row (e.g. 'bytes gotten').
|
|
2891
|
+
consumption_display_name: nil
|
|
1509
2892
|
)
|
|
1510
2893
|
end
|
|
1511
2894
|
|
|
1512
2895
|
sig do
|
|
1513
2896
|
override.returns(
|
|
1514
2897
|
{
|
|
1515
|
-
|
|
1516
|
-
|
|
2898
|
+
allowance_grouping_value: String,
|
|
2899
|
+
consumption_grouping_value: String,
|
|
1517
2900
|
grouping_key: String,
|
|
1518
|
-
unit_amount: String
|
|
2901
|
+
unit_amount: String,
|
|
2902
|
+
allowance_display_name: String,
|
|
2903
|
+
consumption_display_name: String
|
|
1519
2904
|
}
|
|
1520
2905
|
)
|
|
1521
2906
|
end
|
|
@@ -1843,19 +3228,60 @@ module Orb
|
|
|
1843
3228
|
)
|
|
1844
3229
|
end
|
|
1845
3230
|
|
|
1846
|
-
#
|
|
3231
|
+
# Fraction of the component subtotals to charge (0 < percent <= 1).
|
|
1847
3232
|
sig { returns(Float) }
|
|
1848
3233
|
attr_accessor :percent
|
|
1849
3234
|
|
|
3235
|
+
# Maximum amount to charge. If unset, the fee has no upper bound.
|
|
3236
|
+
sig { returns(T.nilable(String)) }
|
|
3237
|
+
attr_accessor :maximum_amount
|
|
3238
|
+
|
|
3239
|
+
# Minimum amount to charge. If unset, the fee is bounded below by 0.
|
|
3240
|
+
sig { returns(T.nilable(String)) }
|
|
3241
|
+
attr_accessor :minimum_amount
|
|
3242
|
+
|
|
3243
|
+
# If true, the minimum_amount is prorated based on the service period. The
|
|
3244
|
+
# maximum_amount is an absolute cap (never prorated), and the percent applied to
|
|
3245
|
+
# upstream subtotals is never prorated either.
|
|
3246
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
3247
|
+
attr_reader :prorated
|
|
3248
|
+
|
|
3249
|
+
sig { params(prorated: T::Boolean).void }
|
|
3250
|
+
attr_writer :prorated
|
|
3251
|
+
|
|
1850
3252
|
# Configuration for percent pricing
|
|
1851
|
-
sig
|
|
3253
|
+
sig do
|
|
3254
|
+
params(
|
|
3255
|
+
percent: Float,
|
|
3256
|
+
maximum_amount: T.nilable(String),
|
|
3257
|
+
minimum_amount: T.nilable(String),
|
|
3258
|
+
prorated: T::Boolean
|
|
3259
|
+
).returns(T.attached_class)
|
|
3260
|
+
end
|
|
1852
3261
|
def self.new(
|
|
1853
|
-
#
|
|
1854
|
-
percent
|
|
3262
|
+
# Fraction of the component subtotals to charge (0 < percent <= 1).
|
|
3263
|
+
percent:,
|
|
3264
|
+
# Maximum amount to charge. If unset, the fee has no upper bound.
|
|
3265
|
+
maximum_amount: nil,
|
|
3266
|
+
# Minimum amount to charge. If unset, the fee is bounded below by 0.
|
|
3267
|
+
minimum_amount: nil,
|
|
3268
|
+
# If true, the minimum_amount is prorated based on the service period. The
|
|
3269
|
+
# maximum_amount is an absolute cap (never prorated), and the percent applied to
|
|
3270
|
+
# upstream subtotals is never prorated either.
|
|
3271
|
+
prorated: nil
|
|
1855
3272
|
)
|
|
1856
3273
|
end
|
|
1857
3274
|
|
|
1858
|
-
sig
|
|
3275
|
+
sig do
|
|
3276
|
+
override.returns(
|
|
3277
|
+
{
|
|
3278
|
+
percent: Float,
|
|
3279
|
+
maximum_amount: T.nilable(String),
|
|
3280
|
+
minimum_amount: T.nilable(String),
|
|
3281
|
+
prorated: T::Boolean
|
|
3282
|
+
}
|
|
3283
|
+
)
|
|
3284
|
+
end
|
|
1859
3285
|
def to_hash
|
|
1860
3286
|
end
|
|
1861
3287
|
end
|