orb-billing 1.13.0 → 1.14.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 +43 -0
- data/README.md +1 -1
- data/lib/orb/client.rb +7 -0
- data/lib/orb/internal/util.rb +22 -7
- data/lib/orb/models/alert.rb +10 -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 +29 -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 +8 -1
- data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +17769 -414
- 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 +17633 -406
- 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/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_retrieve_params.rb +7 -1
- data/lib/orb/models/credit_note_fetch_params.rb +7 -1
- data/lib/orb/models/customer.rb +13 -1
- data/lib/orb/models/customer_create_params.rb +12 -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_update_by_external_id_params.rb +25 -5
- data/lib/orb/models/customer_update_params.rb +25 -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_params.rb +8 -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_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/event_deprecate_params.rb +7 -1
- 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_delete_line_item_params.rb +7 -1
- data/lib/orb/models/invoice_fetch_params.rb +7 -1
- 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_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 +8 -1
- data/lib/orb/models/licenses/usage_get_usage_params.rb +8 -1
- data/lib/orb/models/metric_fetch_params.rb +7 -1
- data/lib/orb/models/metric_update_params.rb +8 -1
- data/lib/orb/models/plan_create_params.rb +8502 -1
- data/lib/orb/models/plan_fetch_params.rb +7 -1
- data/lib/orb/models/plan_update_params.rb +8 -1
- data/lib/orb/models/plans/external_plan_id_fetch_params.rb +7 -1
- data/lib/orb/models/plans/external_plan_id_update_params.rb +8 -1
- data/lib/orb/models/plans/migration_cancel_params.rb +7 -1
- data/lib/orb/models/plans/migration_list_params.rb +8 -1
- data/lib/orb/models/plans/migration_retrieve_params.rb +7 -1
- data/lib/orb/models/price.rb +248 -31
- data/lib/orb/models/price_create_params.rb +949 -1321
- data/lib/orb/models/price_evaluate_params.rb +8 -1
- data/lib/orb/models/price_fetch_params.rb +7 -1
- 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_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_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 +8 -1
- data/lib/orb/models/subscription_redeem_coupon_params.rb +8 -1
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +8 -1
- 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 +8 -1
- data/lib/orb/models/subscription_update_trial_params.rb +8 -1
- data/lib/orb/resources/alerts.rb +8 -1
- 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 +12 -67
- data/lib/orb/resources/customers.rb +6 -5
- data/lib/orb/resources/events/backfills.rb +3 -4
- data/lib/orb/resources/invoices.rb +12 -5
- data/lib/orb/resources/prices.rb +9 -100
- data/lib/orb/resources/subscriptions.rb +4 -4
- data/lib/orb/version.rb +1 -1
- data/rbi/orb/client.rbi +6 -0
- data/rbi/orb/internal/util.rbi +8 -0
- data/rbi/orb/models/alert.rbi +10 -0
- 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 +26 -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 +6 -0
- data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +30163 -889
- 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 +30126 -884
- 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/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_retrieve_params.rbi +13 -5
- data/rbi/orb/models/credit_note_fetch_params.rbi +13 -5
- data/rbi/orb/models/customer.rbi +22 -0
- data/rbi/orb/models/customer_create_params.rbi +17 -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_update_by_external_id_params.rbi +31 -4
- data/rbi/orb/models/customer_update_params.rbi +31 -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_params.rbi +6 -0
- 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_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/event_deprecate_params.rbi +13 -5
- 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_delete_line_item_params.rbi +10 -2
- data/rbi/orb/models/invoice_fetch_params.rbi +13 -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_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 +6 -0
- data/rbi/orb/models/licenses/usage_get_usage_params.rbi +6 -0
- data/rbi/orb/models/metric_fetch_params.rbi +13 -5
- data/rbi/orb/models/metric_update_params.rbi +6 -0
- data/rbi/orb/models/plan_create_params.rbi +14618 -0
- data/rbi/orb/models/plan_fetch_params.rbi +13 -5
- data/rbi/orb/models/plan_update_params.rbi +6 -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 +6 -0
- data/rbi/orb/models/plans/migration_cancel_params.rbi +10 -2
- data/rbi/orb/models/plans/migration_list_params.rbi +6 -0
- data/rbi/orb/models/plans/migration_retrieve_params.rbi +10 -2
- data/rbi/orb/models/price.rbi +186 -0
- data/rbi/orb/models/price_create_params.rbi +1778 -2590
- data/rbi/orb/models/price_evaluate_params.rbi +6 -0
- data/rbi/orb/models/price_fetch_params.rbi +13 -5
- 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_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_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 +6 -0
- data/rbi/orb/models/subscription_redeem_coupon_params.rbi +6 -0
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +6 -0
- 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 +6 -0
- data/rbi/orb/models/subscription_update_trial_params.rbi +6 -0
- data/rbi/orb/resources/alerts.rbi +8 -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 +22 -132
- data/rbi/orb/resources/customers.rbi +12 -7
- data/rbi/orb/resources/events/backfills.rbi +3 -4
- data/rbi/orb/resources/invoices.rbi +11 -3
- data/rbi/orb/resources/prices.rbi +35 -184
- data/rbi/orb/resources/subscriptions.rbi +4 -4
- data/sig/orb/client.rbs +3 -0
- data/sig/orb/internal/util.rbs +4 -0
- data/sig/orb/models/alert.rbs +5 -0
- 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 +16 -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 +5 -1
- data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +12092 -373
- 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 +12075 -370
- 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/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_retrieve_params.rbs +8 -3
- data/sig/orb/models/credit_note_fetch_params.rbs +11 -3
- data/sig/orb/models/customer.rbs +14 -2
- 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_update_by_external_id_params.rbs +17 -1
- data/sig/orb/models/customer_update_params.rbs +17 -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_params.rbs +5 -0
- 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/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_delete_line_item_params.rbs +6 -1
- data/sig/orb/models/invoice_fetch_params.rbs +12 -3
- 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_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 +5 -0
- data/sig/orb/models/licenses/usage_get_usage_params.rbs +5 -0
- data/sig/orb/models/metric_fetch_params.rbs +12 -3
- data/sig/orb/models/metric_update_params.rbs +5 -1
- data/sig/orb/models/plan_create_params.rbs +5850 -0
- data/sig/orb/models/plan_fetch_params.rbs +9 -3
- data/sig/orb/models/plan_update_params.rbs +9 -1
- data/sig/orb/models/plans/external_plan_id_fetch_params.rbs +11 -3
- data/sig/orb/models/plans/external_plan_id_update_params.rbs +9 -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 +155 -0
- data/sig/orb/models/price_create_params.rbs +616 -1011
- data/sig/orb/models/price_evaluate_params.rbs +5 -0
- 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_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_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 +5 -0
- data/sig/orb/models/subscription_redeem_coupon_params.rbs +5 -0
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +5 -0
- 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 +5 -0
- data/sig/orb/models/subscription_update_trial_params.rbs +5 -0
- data/sig/orb/resources/alerts.rbs +2 -0
- data/sig/orb/resources/customers/credits/ledger.rbs +2 -26
- data/sig/orb/resources/invoices.rbs +1 -0
- data/sig/orb/resources/prices.rbs +1 -48
- metadata +2 -2
|
@@ -9,2891 +9,2079 @@ module Orb
|
|
|
9
9
|
OrHash =
|
|
10
10
|
T.type_alias { T.any(Orb::PriceCreateParams, Orb::Internal::AnyHash) }
|
|
11
11
|
|
|
12
|
-
#
|
|
13
|
-
sig
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
attr_accessor :billed_in_advance
|
|
48
|
-
|
|
49
|
-
# For custom cadence: specifies the duration of the billing period in days or
|
|
50
|
-
# months.
|
|
51
|
-
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
52
|
-
attr_reader :billing_cycle_configuration
|
|
53
|
-
|
|
54
|
-
sig do
|
|
55
|
-
params(
|
|
56
|
-
billing_cycle_configuration:
|
|
57
|
-
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
58
|
-
).void
|
|
59
|
-
end
|
|
60
|
-
attr_writer :billing_cycle_configuration
|
|
61
|
-
|
|
62
|
-
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
63
|
-
sig { returns(T.nilable(Float)) }
|
|
64
|
-
attr_accessor :conversion_rate
|
|
65
|
-
|
|
66
|
-
# The configuration for the rate of the price currency to the invoicing currency.
|
|
67
|
-
sig do
|
|
68
|
-
returns(
|
|
69
|
-
T.nilable(
|
|
70
|
-
T.any(
|
|
71
|
-
Orb::UnitConversionRateConfig,
|
|
72
|
-
Orb::TieredConversionRateConfig
|
|
73
|
-
)
|
|
74
|
-
)
|
|
75
|
-
)
|
|
76
|
-
end
|
|
77
|
-
attr_accessor :conversion_rate_config
|
|
78
|
-
|
|
79
|
-
# For dimensional price: specifies a price group and dimension values
|
|
80
|
-
sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
|
|
81
|
-
attr_reader :dimensional_price_configuration
|
|
82
|
-
|
|
83
|
-
sig do
|
|
84
|
-
params(
|
|
85
|
-
dimensional_price_configuration:
|
|
86
|
-
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
|
|
87
|
-
).void
|
|
88
|
-
end
|
|
89
|
-
attr_writer :dimensional_price_configuration
|
|
90
|
-
|
|
91
|
-
# An alias for the price.
|
|
92
|
-
sig { returns(T.nilable(String)) }
|
|
93
|
-
attr_accessor :external_price_id
|
|
94
|
-
|
|
95
|
-
# If the Price represents a fixed cost, this represents the quantity of units
|
|
96
|
-
# applied.
|
|
97
|
-
sig { returns(T.nilable(Float)) }
|
|
98
|
-
attr_accessor :fixed_price_quantity
|
|
99
|
-
|
|
100
|
-
# The property used to group this price on an invoice
|
|
101
|
-
sig { returns(T.nilable(String)) }
|
|
102
|
-
attr_accessor :invoice_grouping_key
|
|
103
|
-
|
|
104
|
-
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
105
|
-
# If unspecified, a single invoice is produced per billing cycle.
|
|
106
|
-
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
107
|
-
attr_reader :invoicing_cycle_configuration
|
|
108
|
-
|
|
109
|
-
sig do
|
|
110
|
-
params(
|
|
111
|
-
invoicing_cycle_configuration:
|
|
112
|
-
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
113
|
-
).void
|
|
114
|
-
end
|
|
115
|
-
attr_writer :invoicing_cycle_configuration
|
|
116
|
-
|
|
117
|
-
# The ID of the license type to associate with this price.
|
|
118
|
-
sig { returns(T.nilable(String)) }
|
|
119
|
-
attr_accessor :license_type_id
|
|
120
|
-
|
|
121
|
-
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
122
|
-
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
123
|
-
# by setting `metadata` to `null`.
|
|
124
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
125
|
-
attr_accessor :metadata
|
|
126
|
-
|
|
127
|
-
# Configuration for tiered pricing
|
|
128
|
-
sig { returns(Orb::TieredConfig) }
|
|
129
|
-
attr_reader :tiered_config
|
|
130
|
-
|
|
131
|
-
sig { params(tiered_config: Orb::TieredConfig::OrHash).void }
|
|
132
|
-
attr_writer :tiered_config
|
|
133
|
-
|
|
134
|
-
# Configuration for bulk pricing
|
|
135
|
-
sig { returns(Orb::BulkConfig) }
|
|
136
|
-
attr_reader :bulk_config
|
|
137
|
-
|
|
138
|
-
sig { params(bulk_config: Orb::BulkConfig::OrHash).void }
|
|
139
|
-
attr_writer :bulk_config
|
|
140
|
-
|
|
141
|
-
# Configuration for bulk_with_filters pricing
|
|
142
|
-
sig { returns(Orb::PriceCreateParams::BulkWithFiltersConfig) }
|
|
143
|
-
attr_reader :bulk_with_filters_config
|
|
144
|
-
|
|
145
|
-
sig do
|
|
146
|
-
params(
|
|
147
|
-
bulk_with_filters_config:
|
|
148
|
-
Orb::PriceCreateParams::BulkWithFiltersConfig::OrHash
|
|
149
|
-
).void
|
|
150
|
-
end
|
|
151
|
-
attr_writer :bulk_with_filters_config
|
|
152
|
-
|
|
153
|
-
# Configuration for package pricing
|
|
154
|
-
sig { returns(Orb::PackageConfig) }
|
|
155
|
-
attr_reader :package_config
|
|
156
|
-
|
|
157
|
-
sig { params(package_config: Orb::PackageConfig::OrHash).void }
|
|
158
|
-
attr_writer :package_config
|
|
159
|
-
|
|
160
|
-
# Configuration for matrix pricing
|
|
161
|
-
sig { returns(Orb::MatrixConfig) }
|
|
162
|
-
attr_reader :matrix_config
|
|
163
|
-
|
|
164
|
-
sig { params(matrix_config: Orb::MatrixConfig::OrHash).void }
|
|
165
|
-
attr_writer :matrix_config
|
|
166
|
-
|
|
167
|
-
# Configuration for threshold_total_amount pricing
|
|
168
|
-
sig { returns(Orb::PriceCreateParams::ThresholdTotalAmountConfig) }
|
|
169
|
-
attr_reader :threshold_total_amount_config
|
|
170
|
-
|
|
171
|
-
sig do
|
|
172
|
-
params(
|
|
173
|
-
threshold_total_amount_config:
|
|
174
|
-
Orb::PriceCreateParams::ThresholdTotalAmountConfig::OrHash
|
|
175
|
-
).void
|
|
176
|
-
end
|
|
177
|
-
attr_writer :threshold_total_amount_config
|
|
178
|
-
|
|
179
|
-
# Configuration for tiered_package pricing
|
|
180
|
-
sig { returns(Orb::PriceCreateParams::TieredPackageConfig) }
|
|
181
|
-
attr_reader :tiered_package_config
|
|
182
|
-
|
|
183
|
-
sig do
|
|
184
|
-
params(
|
|
185
|
-
tiered_package_config:
|
|
186
|
-
Orb::PriceCreateParams::TieredPackageConfig::OrHash
|
|
187
|
-
).void
|
|
188
|
-
end
|
|
189
|
-
attr_writer :tiered_package_config
|
|
190
|
-
|
|
191
|
-
# Configuration for tiered_with_minimum pricing
|
|
192
|
-
sig { returns(Orb::PriceCreateParams::TieredWithMinimumConfig) }
|
|
193
|
-
attr_reader :tiered_with_minimum_config
|
|
194
|
-
|
|
195
|
-
sig do
|
|
196
|
-
params(
|
|
197
|
-
tiered_with_minimum_config:
|
|
198
|
-
Orb::PriceCreateParams::TieredWithMinimumConfig::OrHash
|
|
199
|
-
).void
|
|
200
|
-
end
|
|
201
|
-
attr_writer :tiered_with_minimum_config
|
|
202
|
-
|
|
203
|
-
# Configuration for grouped_tiered pricing
|
|
204
|
-
sig { returns(Orb::PriceCreateParams::GroupedTieredConfig) }
|
|
205
|
-
attr_reader :grouped_tiered_config
|
|
206
|
-
|
|
207
|
-
sig do
|
|
208
|
-
params(
|
|
209
|
-
grouped_tiered_config:
|
|
210
|
-
Orb::PriceCreateParams::GroupedTieredConfig::OrHash
|
|
211
|
-
).void
|
|
212
|
-
end
|
|
213
|
-
attr_writer :grouped_tiered_config
|
|
214
|
-
|
|
215
|
-
# Configuration for tiered_package_with_minimum pricing
|
|
216
|
-
sig { returns(Orb::PriceCreateParams::TieredPackageWithMinimumConfig) }
|
|
217
|
-
attr_reader :tiered_package_with_minimum_config
|
|
218
|
-
|
|
219
|
-
sig do
|
|
220
|
-
params(
|
|
221
|
-
tiered_package_with_minimum_config:
|
|
222
|
-
Orb::PriceCreateParams::TieredPackageWithMinimumConfig::OrHash
|
|
223
|
-
).void
|
|
224
|
-
end
|
|
225
|
-
attr_writer :tiered_package_with_minimum_config
|
|
226
|
-
|
|
227
|
-
# Configuration for package_with_allocation pricing
|
|
228
|
-
sig { returns(Orb::PriceCreateParams::PackageWithAllocationConfig) }
|
|
229
|
-
attr_reader :package_with_allocation_config
|
|
230
|
-
|
|
231
|
-
sig do
|
|
232
|
-
params(
|
|
233
|
-
package_with_allocation_config:
|
|
234
|
-
Orb::PriceCreateParams::PackageWithAllocationConfig::OrHash
|
|
235
|
-
).void
|
|
236
|
-
end
|
|
237
|
-
attr_writer :package_with_allocation_config
|
|
238
|
-
|
|
239
|
-
# Configuration for unit_with_percent pricing
|
|
240
|
-
sig { returns(Orb::PriceCreateParams::UnitWithPercentConfig) }
|
|
241
|
-
attr_reader :unit_with_percent_config
|
|
242
|
-
|
|
243
|
-
sig do
|
|
244
|
-
params(
|
|
245
|
-
unit_with_percent_config:
|
|
246
|
-
Orb::PriceCreateParams::UnitWithPercentConfig::OrHash
|
|
247
|
-
).void
|
|
248
|
-
end
|
|
249
|
-
attr_writer :unit_with_percent_config
|
|
250
|
-
|
|
251
|
-
# Configuration for matrix_with_allocation pricing
|
|
252
|
-
sig { returns(Orb::MatrixWithAllocationConfig) }
|
|
253
|
-
attr_reader :matrix_with_allocation_config
|
|
254
|
-
|
|
255
|
-
sig do
|
|
256
|
-
params(
|
|
257
|
-
matrix_with_allocation_config: Orb::MatrixWithAllocationConfig::OrHash
|
|
258
|
-
).void
|
|
259
|
-
end
|
|
260
|
-
attr_writer :matrix_with_allocation_config
|
|
261
|
-
|
|
262
|
-
# Configuration for tiered_with_proration pricing
|
|
263
|
-
sig { returns(Orb::PriceCreateParams::TieredWithProrationConfig) }
|
|
264
|
-
attr_reader :tiered_with_proration_config
|
|
265
|
-
|
|
266
|
-
sig do
|
|
267
|
-
params(
|
|
268
|
-
tiered_with_proration_config:
|
|
269
|
-
Orb::PriceCreateParams::TieredWithProrationConfig::OrHash
|
|
270
|
-
).void
|
|
271
|
-
end
|
|
272
|
-
attr_writer :tiered_with_proration_config
|
|
273
|
-
|
|
274
|
-
# Configuration for unit_with_proration pricing
|
|
275
|
-
sig { returns(Orb::PriceCreateParams::UnitWithProrationConfig) }
|
|
276
|
-
attr_reader :unit_with_proration_config
|
|
277
|
-
|
|
278
|
-
sig do
|
|
279
|
-
params(
|
|
280
|
-
unit_with_proration_config:
|
|
281
|
-
Orb::PriceCreateParams::UnitWithProrationConfig::OrHash
|
|
282
|
-
).void
|
|
283
|
-
end
|
|
284
|
-
attr_writer :unit_with_proration_config
|
|
285
|
-
|
|
286
|
-
# Configuration for grouped_allocation pricing
|
|
287
|
-
sig { returns(Orb::PriceCreateParams::GroupedAllocationConfig) }
|
|
288
|
-
attr_reader :grouped_allocation_config
|
|
289
|
-
|
|
290
|
-
sig do
|
|
291
|
-
params(
|
|
292
|
-
grouped_allocation_config:
|
|
293
|
-
Orb::PriceCreateParams::GroupedAllocationConfig::OrHash
|
|
294
|
-
).void
|
|
295
|
-
end
|
|
296
|
-
attr_writer :grouped_allocation_config
|
|
297
|
-
|
|
298
|
-
# Configuration for bulk_with_proration pricing
|
|
299
|
-
sig { returns(Orb::PriceCreateParams::BulkWithProrationConfig) }
|
|
300
|
-
attr_reader :bulk_with_proration_config
|
|
301
|
-
|
|
302
|
-
sig do
|
|
303
|
-
params(
|
|
304
|
-
bulk_with_proration_config:
|
|
305
|
-
Orb::PriceCreateParams::BulkWithProrationConfig::OrHash
|
|
306
|
-
).void
|
|
307
|
-
end
|
|
308
|
-
attr_writer :bulk_with_proration_config
|
|
309
|
-
|
|
310
|
-
# Configuration for grouped_with_prorated_minimum pricing
|
|
311
|
-
sig { returns(Orb::PriceCreateParams::GroupedWithProratedMinimumConfig) }
|
|
312
|
-
attr_reader :grouped_with_prorated_minimum_config
|
|
313
|
-
|
|
314
|
-
sig do
|
|
315
|
-
params(
|
|
316
|
-
grouped_with_prorated_minimum_config:
|
|
317
|
-
Orb::PriceCreateParams::GroupedWithProratedMinimumConfig::OrHash
|
|
318
|
-
).void
|
|
319
|
-
end
|
|
320
|
-
attr_writer :grouped_with_prorated_minimum_config
|
|
321
|
-
|
|
322
|
-
# Configuration for grouped_with_metered_minimum pricing
|
|
323
|
-
sig { returns(Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig) }
|
|
324
|
-
attr_reader :grouped_with_metered_minimum_config
|
|
325
|
-
|
|
326
|
-
sig do
|
|
327
|
-
params(
|
|
328
|
-
grouped_with_metered_minimum_config:
|
|
329
|
-
Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::OrHash
|
|
330
|
-
).void
|
|
331
|
-
end
|
|
332
|
-
attr_writer :grouped_with_metered_minimum_config
|
|
333
|
-
|
|
334
|
-
# Configuration for grouped_with_min_max_thresholds pricing
|
|
335
|
-
sig { returns(Orb::PriceCreateParams::GroupedWithMinMaxThresholdsConfig) }
|
|
336
|
-
attr_reader :grouped_with_min_max_thresholds_config
|
|
337
|
-
|
|
338
|
-
sig do
|
|
339
|
-
params(
|
|
340
|
-
grouped_with_min_max_thresholds_config:
|
|
341
|
-
Orb::PriceCreateParams::GroupedWithMinMaxThresholdsConfig::OrHash
|
|
342
|
-
).void
|
|
343
|
-
end
|
|
344
|
-
attr_writer :grouped_with_min_max_thresholds_config
|
|
345
|
-
|
|
346
|
-
# Configuration for matrix_with_display_name pricing
|
|
347
|
-
sig { returns(Orb::PriceCreateParams::MatrixWithDisplayNameConfig) }
|
|
348
|
-
attr_reader :matrix_with_display_name_config
|
|
349
|
-
|
|
350
|
-
sig do
|
|
351
|
-
params(
|
|
352
|
-
matrix_with_display_name_config:
|
|
353
|
-
Orb::PriceCreateParams::MatrixWithDisplayNameConfig::OrHash
|
|
354
|
-
).void
|
|
355
|
-
end
|
|
356
|
-
attr_writer :matrix_with_display_name_config
|
|
357
|
-
|
|
358
|
-
# Configuration for grouped_tiered_package pricing
|
|
359
|
-
sig { returns(Orb::PriceCreateParams::GroupedTieredPackageConfig) }
|
|
360
|
-
attr_reader :grouped_tiered_package_config
|
|
361
|
-
|
|
362
|
-
sig do
|
|
363
|
-
params(
|
|
364
|
-
grouped_tiered_package_config:
|
|
365
|
-
Orb::PriceCreateParams::GroupedTieredPackageConfig::OrHash
|
|
366
|
-
).void
|
|
367
|
-
end
|
|
368
|
-
attr_writer :grouped_tiered_package_config
|
|
369
|
-
|
|
370
|
-
# Configuration for max_group_tiered_package pricing
|
|
371
|
-
sig { returns(Orb::PriceCreateParams::MaxGroupTieredPackageConfig) }
|
|
372
|
-
attr_reader :max_group_tiered_package_config
|
|
373
|
-
|
|
374
|
-
sig do
|
|
375
|
-
params(
|
|
376
|
-
max_group_tiered_package_config:
|
|
377
|
-
Orb::PriceCreateParams::MaxGroupTieredPackageConfig::OrHash
|
|
378
|
-
).void
|
|
379
|
-
end
|
|
380
|
-
attr_writer :max_group_tiered_package_config
|
|
381
|
-
|
|
382
|
-
# Configuration for scalable_matrix_with_unit_pricing pricing
|
|
383
|
-
sig do
|
|
384
|
-
returns(Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig)
|
|
385
|
-
end
|
|
386
|
-
attr_reader :scalable_matrix_with_unit_pricing_config
|
|
387
|
-
|
|
388
|
-
sig do
|
|
389
|
-
params(
|
|
390
|
-
scalable_matrix_with_unit_pricing_config:
|
|
391
|
-
Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig::OrHash
|
|
392
|
-
).void
|
|
393
|
-
end
|
|
394
|
-
attr_writer :scalable_matrix_with_unit_pricing_config
|
|
395
|
-
|
|
396
|
-
# Configuration for scalable_matrix_with_tiered_pricing pricing
|
|
397
|
-
sig do
|
|
398
|
-
returns(Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig)
|
|
399
|
-
end
|
|
400
|
-
attr_reader :scalable_matrix_with_tiered_pricing_config
|
|
401
|
-
|
|
402
|
-
sig do
|
|
403
|
-
params(
|
|
404
|
-
scalable_matrix_with_tiered_pricing_config:
|
|
405
|
-
Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::OrHash
|
|
406
|
-
).void
|
|
407
|
-
end
|
|
408
|
-
attr_writer :scalable_matrix_with_tiered_pricing_config
|
|
409
|
-
|
|
410
|
-
# Configuration for cumulative_grouped_bulk pricing
|
|
411
|
-
sig { returns(Orb::PriceCreateParams::CumulativeGroupedBulkConfig) }
|
|
412
|
-
attr_reader :cumulative_grouped_bulk_config
|
|
413
|
-
|
|
414
|
-
sig do
|
|
415
|
-
params(
|
|
416
|
-
cumulative_grouped_bulk_config:
|
|
417
|
-
Orb::PriceCreateParams::CumulativeGroupedBulkConfig::OrHash
|
|
418
|
-
).void
|
|
419
|
-
end
|
|
420
|
-
attr_writer :cumulative_grouped_bulk_config
|
|
421
|
-
|
|
422
|
-
# Configuration for cumulative_grouped_allocation pricing
|
|
423
|
-
sig { returns(Orb::PriceCreateParams::CumulativeGroupedAllocationConfig) }
|
|
424
|
-
attr_reader :cumulative_grouped_allocation_config
|
|
425
|
-
|
|
426
|
-
sig do
|
|
427
|
-
params(
|
|
428
|
-
cumulative_grouped_allocation_config:
|
|
429
|
-
Orb::PriceCreateParams::CumulativeGroupedAllocationConfig::OrHash
|
|
430
|
-
).void
|
|
431
|
-
end
|
|
432
|
-
attr_writer :cumulative_grouped_allocation_config
|
|
433
|
-
|
|
434
|
-
# Configuration for minimum_composite pricing
|
|
435
|
-
sig { returns(Orb::PriceCreateParams::MinimumCompositeConfig) }
|
|
436
|
-
attr_reader :minimum_composite_config
|
|
437
|
-
|
|
438
|
-
sig do
|
|
439
|
-
params(
|
|
440
|
-
minimum_composite_config:
|
|
441
|
-
Orb::PriceCreateParams::MinimumCompositeConfig::OrHash
|
|
442
|
-
).void
|
|
443
|
-
end
|
|
444
|
-
attr_writer :minimum_composite_config
|
|
445
|
-
|
|
446
|
-
# Configuration for percent pricing
|
|
447
|
-
sig { returns(Orb::PriceCreateParams::PercentConfig) }
|
|
448
|
-
attr_reader :percent_config
|
|
449
|
-
|
|
450
|
-
sig do
|
|
451
|
-
params(
|
|
452
|
-
percent_config: Orb::PriceCreateParams::PercentConfig::OrHash
|
|
453
|
-
).void
|
|
454
|
-
end
|
|
455
|
-
attr_writer :percent_config
|
|
456
|
-
|
|
457
|
-
# Configuration for event_output pricing
|
|
458
|
-
sig { returns(Orb::PriceCreateParams::EventOutputConfig) }
|
|
459
|
-
attr_reader :event_output_config
|
|
460
|
-
|
|
461
|
-
sig do
|
|
462
|
-
params(
|
|
463
|
-
event_output_config: Orb::PriceCreateParams::EventOutputConfig::OrHash
|
|
464
|
-
).void
|
|
465
|
-
end
|
|
466
|
-
attr_writer :event_output_config
|
|
467
|
-
|
|
468
|
-
sig do
|
|
469
|
-
params(
|
|
470
|
-
cadence: Orb::PriceCreateParams::Cadence::OrSymbol,
|
|
471
|
-
currency: String,
|
|
472
|
-
item_id: String,
|
|
473
|
-
model_type: Orb::PriceCreateParams::ModelType::OrSymbol,
|
|
474
|
-
name: String,
|
|
475
|
-
unit_config: Orb::UnitConfig::OrHash,
|
|
476
|
-
tiered_config: Orb::TieredConfig::OrHash,
|
|
477
|
-
bulk_config: Orb::BulkConfig::OrHash,
|
|
478
|
-
bulk_with_filters_config:
|
|
479
|
-
Orb::PriceCreateParams::BulkWithFiltersConfig::OrHash,
|
|
480
|
-
package_config: Orb::PackageConfig::OrHash,
|
|
481
|
-
matrix_config: Orb::MatrixConfig::OrHash,
|
|
482
|
-
threshold_total_amount_config:
|
|
483
|
-
Orb::PriceCreateParams::ThresholdTotalAmountConfig::OrHash,
|
|
484
|
-
tiered_package_config:
|
|
485
|
-
Orb::PriceCreateParams::TieredPackageConfig::OrHash,
|
|
486
|
-
tiered_with_minimum_config:
|
|
487
|
-
Orb::PriceCreateParams::TieredWithMinimumConfig::OrHash,
|
|
488
|
-
grouped_tiered_config:
|
|
489
|
-
Orb::PriceCreateParams::GroupedTieredConfig::OrHash,
|
|
490
|
-
tiered_package_with_minimum_config:
|
|
491
|
-
Orb::PriceCreateParams::TieredPackageWithMinimumConfig::OrHash,
|
|
492
|
-
package_with_allocation_config:
|
|
493
|
-
Orb::PriceCreateParams::PackageWithAllocationConfig::OrHash,
|
|
494
|
-
unit_with_percent_config:
|
|
495
|
-
Orb::PriceCreateParams::UnitWithPercentConfig::OrHash,
|
|
496
|
-
matrix_with_allocation_config:
|
|
497
|
-
Orb::MatrixWithAllocationConfig::OrHash,
|
|
498
|
-
tiered_with_proration_config:
|
|
499
|
-
Orb::PriceCreateParams::TieredWithProrationConfig::OrHash,
|
|
500
|
-
unit_with_proration_config:
|
|
501
|
-
Orb::PriceCreateParams::UnitWithProrationConfig::OrHash,
|
|
502
|
-
grouped_allocation_config:
|
|
503
|
-
Orb::PriceCreateParams::GroupedAllocationConfig::OrHash,
|
|
504
|
-
bulk_with_proration_config:
|
|
505
|
-
Orb::PriceCreateParams::BulkWithProrationConfig::OrHash,
|
|
506
|
-
grouped_with_prorated_minimum_config:
|
|
507
|
-
Orb::PriceCreateParams::GroupedWithProratedMinimumConfig::OrHash,
|
|
508
|
-
grouped_with_metered_minimum_config:
|
|
509
|
-
Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::OrHash,
|
|
510
|
-
grouped_with_min_max_thresholds_config:
|
|
511
|
-
Orb::PriceCreateParams::GroupedWithMinMaxThresholdsConfig::OrHash,
|
|
512
|
-
matrix_with_display_name_config:
|
|
513
|
-
Orb::PriceCreateParams::MatrixWithDisplayNameConfig::OrHash,
|
|
514
|
-
grouped_tiered_package_config:
|
|
515
|
-
Orb::PriceCreateParams::GroupedTieredPackageConfig::OrHash,
|
|
516
|
-
max_group_tiered_package_config:
|
|
517
|
-
Orb::PriceCreateParams::MaxGroupTieredPackageConfig::OrHash,
|
|
518
|
-
scalable_matrix_with_unit_pricing_config:
|
|
519
|
-
Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig::OrHash,
|
|
520
|
-
scalable_matrix_with_tiered_pricing_config:
|
|
521
|
-
Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::OrHash,
|
|
522
|
-
cumulative_grouped_bulk_config:
|
|
523
|
-
Orb::PriceCreateParams::CumulativeGroupedBulkConfig::OrHash,
|
|
524
|
-
cumulative_grouped_allocation_config:
|
|
525
|
-
Orb::PriceCreateParams::CumulativeGroupedAllocationConfig::OrHash,
|
|
526
|
-
minimum_composite_config:
|
|
527
|
-
Orb::PriceCreateParams::MinimumCompositeConfig::OrHash,
|
|
528
|
-
percent_config: Orb::PriceCreateParams::PercentConfig::OrHash,
|
|
529
|
-
event_output_config:
|
|
530
|
-
Orb::PriceCreateParams::EventOutputConfig::OrHash,
|
|
531
|
-
billable_metric_id: T.nilable(String),
|
|
532
|
-
billed_in_advance: T.nilable(T::Boolean),
|
|
533
|
-
billing_cycle_configuration:
|
|
534
|
-
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
535
|
-
conversion_rate: T.nilable(Float),
|
|
536
|
-
conversion_rate_config:
|
|
537
|
-
T.nilable(
|
|
538
|
-
T.any(
|
|
539
|
-
Orb::UnitConversionRateConfig::OrHash,
|
|
540
|
-
Orb::TieredConversionRateConfig::OrHash
|
|
541
|
-
)
|
|
542
|
-
),
|
|
543
|
-
dimensional_price_configuration:
|
|
544
|
-
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
|
|
545
|
-
external_price_id: T.nilable(String),
|
|
546
|
-
fixed_price_quantity: T.nilable(Float),
|
|
547
|
-
invoice_grouping_key: T.nilable(String),
|
|
548
|
-
invoicing_cycle_configuration:
|
|
549
|
-
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
550
|
-
license_type_id: T.nilable(String),
|
|
551
|
-
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
552
|
-
request_options: Orb::RequestOptions::OrHash
|
|
553
|
-
).returns(T.attached_class)
|
|
554
|
-
end
|
|
555
|
-
def self.new(
|
|
556
|
-
# The cadence to bill for this price on.
|
|
557
|
-
cadence:,
|
|
558
|
-
# An ISO 4217 currency string for which this price is billed in.
|
|
559
|
-
currency:,
|
|
560
|
-
# The id of the item the price will be associated with.
|
|
561
|
-
item_id:,
|
|
562
|
-
# The pricing model type
|
|
563
|
-
model_type:,
|
|
564
|
-
# The name of the price.
|
|
565
|
-
name:,
|
|
566
|
-
# Configuration for unit pricing
|
|
567
|
-
unit_config:,
|
|
568
|
-
# Configuration for tiered pricing
|
|
569
|
-
tiered_config:,
|
|
570
|
-
# Configuration for bulk pricing
|
|
571
|
-
bulk_config:,
|
|
572
|
-
# Configuration for bulk_with_filters pricing
|
|
573
|
-
bulk_with_filters_config:,
|
|
574
|
-
# Configuration for package pricing
|
|
575
|
-
package_config:,
|
|
576
|
-
# Configuration for matrix pricing
|
|
577
|
-
matrix_config:,
|
|
578
|
-
# Configuration for threshold_total_amount pricing
|
|
579
|
-
threshold_total_amount_config:,
|
|
580
|
-
# Configuration for tiered_package pricing
|
|
581
|
-
tiered_package_config:,
|
|
582
|
-
# Configuration for tiered_with_minimum pricing
|
|
583
|
-
tiered_with_minimum_config:,
|
|
584
|
-
# Configuration for grouped_tiered pricing
|
|
585
|
-
grouped_tiered_config:,
|
|
586
|
-
# Configuration for tiered_package_with_minimum pricing
|
|
587
|
-
tiered_package_with_minimum_config:,
|
|
588
|
-
# Configuration for package_with_allocation pricing
|
|
589
|
-
package_with_allocation_config:,
|
|
590
|
-
# Configuration for unit_with_percent pricing
|
|
591
|
-
unit_with_percent_config:,
|
|
592
|
-
# Configuration for matrix_with_allocation pricing
|
|
593
|
-
matrix_with_allocation_config:,
|
|
594
|
-
# Configuration for tiered_with_proration pricing
|
|
595
|
-
tiered_with_proration_config:,
|
|
596
|
-
# Configuration for unit_with_proration pricing
|
|
597
|
-
unit_with_proration_config:,
|
|
598
|
-
# Configuration for grouped_allocation pricing
|
|
599
|
-
grouped_allocation_config:,
|
|
600
|
-
# Configuration for bulk_with_proration pricing
|
|
601
|
-
bulk_with_proration_config:,
|
|
602
|
-
# Configuration for grouped_with_prorated_minimum pricing
|
|
603
|
-
grouped_with_prorated_minimum_config:,
|
|
604
|
-
# Configuration for grouped_with_metered_minimum pricing
|
|
605
|
-
grouped_with_metered_minimum_config:,
|
|
606
|
-
# Configuration for grouped_with_min_max_thresholds pricing
|
|
607
|
-
grouped_with_min_max_thresholds_config:,
|
|
608
|
-
# Configuration for matrix_with_display_name pricing
|
|
609
|
-
matrix_with_display_name_config:,
|
|
610
|
-
# Configuration for grouped_tiered_package pricing
|
|
611
|
-
grouped_tiered_package_config:,
|
|
612
|
-
# Configuration for max_group_tiered_package pricing
|
|
613
|
-
max_group_tiered_package_config:,
|
|
614
|
-
# Configuration for scalable_matrix_with_unit_pricing pricing
|
|
615
|
-
scalable_matrix_with_unit_pricing_config:,
|
|
616
|
-
# Configuration for scalable_matrix_with_tiered_pricing pricing
|
|
617
|
-
scalable_matrix_with_tiered_pricing_config:,
|
|
618
|
-
# Configuration for cumulative_grouped_bulk pricing
|
|
619
|
-
cumulative_grouped_bulk_config:,
|
|
620
|
-
# Configuration for cumulative_grouped_allocation pricing
|
|
621
|
-
cumulative_grouped_allocation_config:,
|
|
622
|
-
# Configuration for minimum_composite pricing
|
|
623
|
-
minimum_composite_config:,
|
|
624
|
-
# Configuration for percent pricing
|
|
625
|
-
percent_config:,
|
|
626
|
-
# Configuration for event_output pricing
|
|
627
|
-
event_output_config:,
|
|
628
|
-
# The id of the billable metric for the price. Only needed if the price is
|
|
629
|
-
# usage-based.
|
|
630
|
-
billable_metric_id: nil,
|
|
631
|
-
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
632
|
-
# this is true, and in-arrears if this is false.
|
|
633
|
-
billed_in_advance: nil,
|
|
634
|
-
# For custom cadence: specifies the duration of the billing period in days or
|
|
635
|
-
# months.
|
|
636
|
-
billing_cycle_configuration: nil,
|
|
637
|
-
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
638
|
-
conversion_rate: nil,
|
|
639
|
-
# The configuration for the rate of the price currency to the invoicing currency.
|
|
640
|
-
conversion_rate_config: nil,
|
|
641
|
-
# For dimensional price: specifies a price group and dimension values
|
|
642
|
-
dimensional_price_configuration: nil,
|
|
643
|
-
# An alias for the price.
|
|
644
|
-
external_price_id: nil,
|
|
645
|
-
# If the Price represents a fixed cost, this represents the quantity of units
|
|
646
|
-
# applied.
|
|
647
|
-
fixed_price_quantity: nil,
|
|
648
|
-
# The property used to group this price on an invoice
|
|
649
|
-
invoice_grouping_key: nil,
|
|
650
|
-
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
651
|
-
# If unspecified, a single invoice is produced per billing cycle.
|
|
652
|
-
invoicing_cycle_configuration: nil,
|
|
653
|
-
# The ID of the license type to associate with this price.
|
|
654
|
-
license_type_id: nil,
|
|
655
|
-
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
656
|
-
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
657
|
-
# by setting `metadata` to `null`.
|
|
658
|
-
metadata: nil,
|
|
659
|
-
request_options: {}
|
|
660
|
-
)
|
|
661
|
-
end
|
|
662
|
-
|
|
663
|
-
sig do
|
|
664
|
-
override.returns(
|
|
665
|
-
{
|
|
666
|
-
cadence: Orb::PriceCreateParams::Cadence::OrSymbol,
|
|
667
|
-
currency: String,
|
|
668
|
-
item_id: String,
|
|
669
|
-
model_type: Orb::PriceCreateParams::ModelType::OrSymbol,
|
|
670
|
-
name: String,
|
|
671
|
-
unit_config: Orb::UnitConfig,
|
|
672
|
-
billable_metric_id: T.nilable(String),
|
|
673
|
-
billed_in_advance: T.nilable(T::Boolean),
|
|
674
|
-
billing_cycle_configuration:
|
|
675
|
-
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
676
|
-
conversion_rate: T.nilable(Float),
|
|
677
|
-
conversion_rate_config:
|
|
678
|
-
T.nilable(
|
|
679
|
-
T.any(
|
|
680
|
-
Orb::UnitConversionRateConfig,
|
|
681
|
-
Orb::TieredConversionRateConfig
|
|
682
|
-
)
|
|
683
|
-
),
|
|
684
|
-
dimensional_price_configuration:
|
|
685
|
-
T.nilable(Orb::NewDimensionalPriceConfiguration),
|
|
686
|
-
external_price_id: T.nilable(String),
|
|
687
|
-
fixed_price_quantity: T.nilable(Float),
|
|
688
|
-
invoice_grouping_key: T.nilable(String),
|
|
689
|
-
invoicing_cycle_configuration:
|
|
690
|
-
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
691
|
-
license_type_id: T.nilable(String),
|
|
692
|
-
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
693
|
-
tiered_config: Orb::TieredConfig,
|
|
694
|
-
bulk_config: Orb::BulkConfig,
|
|
695
|
-
bulk_with_filters_config:
|
|
696
|
-
Orb::PriceCreateParams::BulkWithFiltersConfig,
|
|
697
|
-
package_config: Orb::PackageConfig,
|
|
698
|
-
matrix_config: Orb::MatrixConfig,
|
|
699
|
-
threshold_total_amount_config:
|
|
700
|
-
Orb::PriceCreateParams::ThresholdTotalAmountConfig,
|
|
701
|
-
tiered_package_config: Orb::PriceCreateParams::TieredPackageConfig,
|
|
702
|
-
tiered_with_minimum_config:
|
|
703
|
-
Orb::PriceCreateParams::TieredWithMinimumConfig,
|
|
704
|
-
grouped_tiered_config: Orb::PriceCreateParams::GroupedTieredConfig,
|
|
705
|
-
tiered_package_with_minimum_config:
|
|
706
|
-
Orb::PriceCreateParams::TieredPackageWithMinimumConfig,
|
|
707
|
-
package_with_allocation_config:
|
|
708
|
-
Orb::PriceCreateParams::PackageWithAllocationConfig,
|
|
709
|
-
unit_with_percent_config:
|
|
710
|
-
Orb::PriceCreateParams::UnitWithPercentConfig,
|
|
711
|
-
matrix_with_allocation_config: Orb::MatrixWithAllocationConfig,
|
|
712
|
-
tiered_with_proration_config:
|
|
713
|
-
Orb::PriceCreateParams::TieredWithProrationConfig,
|
|
714
|
-
unit_with_proration_config:
|
|
715
|
-
Orb::PriceCreateParams::UnitWithProrationConfig,
|
|
716
|
-
grouped_allocation_config:
|
|
717
|
-
Orb::PriceCreateParams::GroupedAllocationConfig,
|
|
718
|
-
bulk_with_proration_config:
|
|
719
|
-
Orb::PriceCreateParams::BulkWithProrationConfig,
|
|
720
|
-
grouped_with_prorated_minimum_config:
|
|
721
|
-
Orb::PriceCreateParams::GroupedWithProratedMinimumConfig,
|
|
722
|
-
grouped_with_metered_minimum_config:
|
|
723
|
-
Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig,
|
|
724
|
-
grouped_with_min_max_thresholds_config:
|
|
725
|
-
Orb::PriceCreateParams::GroupedWithMinMaxThresholdsConfig,
|
|
726
|
-
matrix_with_display_name_config:
|
|
727
|
-
Orb::PriceCreateParams::MatrixWithDisplayNameConfig,
|
|
728
|
-
grouped_tiered_package_config:
|
|
729
|
-
Orb::PriceCreateParams::GroupedTieredPackageConfig,
|
|
730
|
-
max_group_tiered_package_config:
|
|
731
|
-
Orb::PriceCreateParams::MaxGroupTieredPackageConfig,
|
|
732
|
-
scalable_matrix_with_unit_pricing_config:
|
|
733
|
-
Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig,
|
|
734
|
-
scalable_matrix_with_tiered_pricing_config:
|
|
735
|
-
Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig,
|
|
736
|
-
cumulative_grouped_bulk_config:
|
|
737
|
-
Orb::PriceCreateParams::CumulativeGroupedBulkConfig,
|
|
738
|
-
cumulative_grouped_allocation_config:
|
|
739
|
-
Orb::PriceCreateParams::CumulativeGroupedAllocationConfig,
|
|
740
|
-
minimum_composite_config:
|
|
741
|
-
Orb::PriceCreateParams::MinimumCompositeConfig,
|
|
742
|
-
percent_config: Orb::PriceCreateParams::PercentConfig,
|
|
743
|
-
event_output_config: Orb::PriceCreateParams::EventOutputConfig,
|
|
744
|
-
request_options: Orb::RequestOptions
|
|
745
|
-
}
|
|
746
|
-
)
|
|
747
|
-
end
|
|
748
|
-
def to_hash
|
|
749
|
-
end
|
|
750
|
-
|
|
751
|
-
# The cadence to bill for this price on.
|
|
752
|
-
module Cadence
|
|
753
|
-
extend Orb::Internal::Type::Enum
|
|
754
|
-
|
|
755
|
-
TaggedSymbol =
|
|
756
|
-
T.type_alias { T.all(Symbol, Orb::PriceCreateParams::Cadence) }
|
|
757
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
758
|
-
|
|
759
|
-
ANNUAL = T.let(:annual, Orb::PriceCreateParams::Cadence::TaggedSymbol)
|
|
760
|
-
SEMI_ANNUAL =
|
|
761
|
-
T.let(:semi_annual, Orb::PriceCreateParams::Cadence::TaggedSymbol)
|
|
762
|
-
MONTHLY = T.let(:monthly, Orb::PriceCreateParams::Cadence::TaggedSymbol)
|
|
763
|
-
QUARTERLY =
|
|
764
|
-
T.let(:quarterly, Orb::PriceCreateParams::Cadence::TaggedSymbol)
|
|
765
|
-
ONE_TIME =
|
|
766
|
-
T.let(:one_time, Orb::PriceCreateParams::Cadence::TaggedSymbol)
|
|
767
|
-
CUSTOM = T.let(:custom, Orb::PriceCreateParams::Cadence::TaggedSymbol)
|
|
768
|
-
|
|
769
|
-
sig do
|
|
770
|
-
override.returns(
|
|
771
|
-
T::Array[Orb::PriceCreateParams::Cadence::TaggedSymbol]
|
|
772
|
-
)
|
|
773
|
-
end
|
|
774
|
-
def self.values
|
|
775
|
-
end
|
|
776
|
-
end
|
|
777
|
-
|
|
778
|
-
# The pricing model type
|
|
779
|
-
module ModelType
|
|
780
|
-
extend Orb::Internal::Type::Enum
|
|
781
|
-
|
|
782
|
-
TaggedSymbol =
|
|
783
|
-
T.type_alias { T.all(Symbol, Orb::PriceCreateParams::ModelType) }
|
|
784
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
785
|
-
|
|
786
|
-
EVENT_OUTPUT =
|
|
787
|
-
T.let(:event_output, Orb::PriceCreateParams::ModelType::TaggedSymbol)
|
|
788
|
-
|
|
789
|
-
sig do
|
|
790
|
-
override.returns(
|
|
791
|
-
T::Array[Orb::PriceCreateParams::ModelType::TaggedSymbol]
|
|
792
|
-
)
|
|
793
|
-
end
|
|
794
|
-
def self.values
|
|
795
|
-
end
|
|
796
|
-
end
|
|
797
|
-
|
|
798
|
-
class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel
|
|
799
|
-
OrHash =
|
|
800
|
-
T.type_alias do
|
|
801
|
-
T.any(
|
|
802
|
-
Orb::PriceCreateParams::BulkWithFiltersConfig,
|
|
803
|
-
Orb::Internal::AnyHash
|
|
804
|
-
)
|
|
805
|
-
end
|
|
806
|
-
|
|
807
|
-
# Property filters to apply (all must match)
|
|
808
|
-
sig do
|
|
809
|
-
returns(
|
|
810
|
-
T::Array[Orb::PriceCreateParams::BulkWithFiltersConfig::Filter]
|
|
811
|
-
)
|
|
812
|
-
end
|
|
813
|
-
attr_accessor :filters
|
|
814
|
-
|
|
815
|
-
# Bulk tiers for rating based on total usage volume
|
|
816
|
-
sig do
|
|
817
|
-
returns(T::Array[Orb::PriceCreateParams::BulkWithFiltersConfig::Tier])
|
|
818
|
-
end
|
|
819
|
-
attr_accessor :tiers
|
|
820
|
-
|
|
821
|
-
# Configuration for bulk_with_filters pricing
|
|
822
|
-
sig do
|
|
823
|
-
params(
|
|
824
|
-
filters:
|
|
825
|
-
T::Array[
|
|
826
|
-
Orb::PriceCreateParams::BulkWithFiltersConfig::Filter::OrHash
|
|
827
|
-
],
|
|
828
|
-
tiers:
|
|
829
|
-
T::Array[
|
|
830
|
-
Orb::PriceCreateParams::BulkWithFiltersConfig::Tier::OrHash
|
|
831
|
-
]
|
|
832
|
-
).returns(T.attached_class)
|
|
833
|
-
end
|
|
834
|
-
def self.new(
|
|
835
|
-
# Property filters to apply (all must match)
|
|
836
|
-
filters:,
|
|
837
|
-
# Bulk tiers for rating based on total usage volume
|
|
838
|
-
tiers:
|
|
839
|
-
)
|
|
840
|
-
end
|
|
841
|
-
|
|
842
|
-
sig do
|
|
843
|
-
override.returns(
|
|
844
|
-
{
|
|
845
|
-
filters:
|
|
846
|
-
T::Array[Orb::PriceCreateParams::BulkWithFiltersConfig::Filter],
|
|
847
|
-
tiers:
|
|
848
|
-
T::Array[Orb::PriceCreateParams::BulkWithFiltersConfig::Tier]
|
|
849
|
-
}
|
|
850
|
-
)
|
|
851
|
-
end
|
|
852
|
-
def to_hash
|
|
853
|
-
end
|
|
854
|
-
|
|
855
|
-
class Filter < Orb::Internal::Type::BaseModel
|
|
856
|
-
OrHash =
|
|
857
|
-
T.type_alias do
|
|
858
|
-
T.any(
|
|
859
|
-
Orb::PriceCreateParams::BulkWithFiltersConfig::Filter,
|
|
860
|
-
Orb::Internal::AnyHash
|
|
861
|
-
)
|
|
862
|
-
end
|
|
863
|
-
|
|
864
|
-
# Event property key to filter on
|
|
865
|
-
sig { returns(String) }
|
|
866
|
-
attr_accessor :property_key
|
|
867
|
-
|
|
868
|
-
# Event property value to match
|
|
869
|
-
sig { returns(String) }
|
|
870
|
-
attr_accessor :property_value
|
|
871
|
-
|
|
872
|
-
# Configuration for a single property filter
|
|
873
|
-
sig do
|
|
874
|
-
params(property_key: String, property_value: String).returns(
|
|
875
|
-
T.attached_class
|
|
876
|
-
)
|
|
877
|
-
end
|
|
878
|
-
def self.new(
|
|
879
|
-
# Event property key to filter on
|
|
880
|
-
property_key:,
|
|
881
|
-
# Event property value to match
|
|
882
|
-
property_value:
|
|
883
|
-
)
|
|
884
|
-
end
|
|
885
|
-
|
|
886
|
-
sig do
|
|
887
|
-
override.returns({ property_key: String, property_value: String })
|
|
888
|
-
end
|
|
889
|
-
def to_hash
|
|
890
|
-
end
|
|
891
|
-
end
|
|
892
|
-
|
|
893
|
-
class Tier < Orb::Internal::Type::BaseModel
|
|
894
|
-
OrHash =
|
|
895
|
-
T.type_alias do
|
|
896
|
-
T.any(
|
|
897
|
-
Orb::PriceCreateParams::BulkWithFiltersConfig::Tier,
|
|
898
|
-
Orb::Internal::AnyHash
|
|
899
|
-
)
|
|
900
|
-
end
|
|
901
|
-
|
|
902
|
-
# Amount per unit
|
|
903
|
-
sig { returns(String) }
|
|
904
|
-
attr_accessor :unit_amount
|
|
905
|
-
|
|
906
|
-
# The lower bound for this tier
|
|
907
|
-
sig { returns(T.nilable(String)) }
|
|
908
|
-
attr_accessor :tier_lower_bound
|
|
909
|
-
|
|
910
|
-
# Configuration for a single bulk pricing tier
|
|
911
|
-
sig do
|
|
912
|
-
params(
|
|
913
|
-
unit_amount: String,
|
|
914
|
-
tier_lower_bound: T.nilable(String)
|
|
915
|
-
).returns(T.attached_class)
|
|
916
|
-
end
|
|
917
|
-
def self.new(
|
|
918
|
-
# Amount per unit
|
|
919
|
-
unit_amount:,
|
|
920
|
-
# The lower bound for this tier
|
|
921
|
-
tier_lower_bound: nil
|
|
922
|
-
)
|
|
923
|
-
end
|
|
924
|
-
|
|
925
|
-
sig do
|
|
926
|
-
override.returns(
|
|
927
|
-
{ unit_amount: String, tier_lower_bound: T.nilable(String) }
|
|
928
|
-
)
|
|
929
|
-
end
|
|
930
|
-
def to_hash
|
|
931
|
-
end
|
|
932
|
-
end
|
|
933
|
-
end
|
|
934
|
-
|
|
935
|
-
class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel
|
|
936
|
-
OrHash =
|
|
937
|
-
T.type_alias do
|
|
938
|
-
T.any(
|
|
939
|
-
Orb::PriceCreateParams::ThresholdTotalAmountConfig,
|
|
940
|
-
Orb::Internal::AnyHash
|
|
941
|
-
)
|
|
942
|
-
end
|
|
943
|
-
|
|
944
|
-
# When the quantity consumed passes a provided threshold, the configured total
|
|
945
|
-
# will be charged
|
|
946
|
-
sig do
|
|
947
|
-
returns(
|
|
948
|
-
T::Array[
|
|
949
|
-
Orb::PriceCreateParams::ThresholdTotalAmountConfig::ConsumptionTable
|
|
950
|
-
]
|
|
951
|
-
)
|
|
952
|
-
end
|
|
953
|
-
attr_accessor :consumption_table
|
|
954
|
-
|
|
955
|
-
# If true, the unit price will be prorated to the billing period
|
|
956
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
957
|
-
attr_accessor :prorate
|
|
958
|
-
|
|
959
|
-
# Configuration for threshold_total_amount pricing
|
|
960
|
-
sig do
|
|
961
|
-
params(
|
|
962
|
-
consumption_table:
|
|
963
|
-
T::Array[
|
|
964
|
-
Orb::PriceCreateParams::ThresholdTotalAmountConfig::ConsumptionTable::OrHash
|
|
965
|
-
],
|
|
966
|
-
prorate: T.nilable(T::Boolean)
|
|
967
|
-
).returns(T.attached_class)
|
|
968
|
-
end
|
|
969
|
-
def self.new(
|
|
970
|
-
# When the quantity consumed passes a provided threshold, the configured total
|
|
971
|
-
# will be charged
|
|
972
|
-
consumption_table:,
|
|
973
|
-
# If true, the unit price will be prorated to the billing period
|
|
974
|
-
prorate: nil
|
|
975
|
-
)
|
|
976
|
-
end
|
|
977
|
-
|
|
978
|
-
sig do
|
|
979
|
-
override.returns(
|
|
980
|
-
{
|
|
981
|
-
consumption_table:
|
|
982
|
-
T::Array[
|
|
983
|
-
Orb::PriceCreateParams::ThresholdTotalAmountConfig::ConsumptionTable
|
|
984
|
-
],
|
|
985
|
-
prorate: T.nilable(T::Boolean)
|
|
986
|
-
}
|
|
987
|
-
)
|
|
988
|
-
end
|
|
989
|
-
def to_hash
|
|
990
|
-
end
|
|
991
|
-
|
|
992
|
-
class ConsumptionTable < Orb::Internal::Type::BaseModel
|
|
993
|
-
OrHash =
|
|
994
|
-
T.type_alias do
|
|
995
|
-
T.any(
|
|
996
|
-
Orb::PriceCreateParams::ThresholdTotalAmountConfig::ConsumptionTable,
|
|
997
|
-
Orb::Internal::AnyHash
|
|
998
|
-
)
|
|
999
|
-
end
|
|
1000
|
-
|
|
1001
|
-
sig { returns(String) }
|
|
1002
|
-
attr_accessor :threshold
|
|
1003
|
-
|
|
1004
|
-
# Total amount for this threshold
|
|
1005
|
-
sig { returns(String) }
|
|
1006
|
-
attr_accessor :total_amount
|
|
1007
|
-
|
|
1008
|
-
# Configuration for a single threshold
|
|
1009
|
-
sig do
|
|
1010
|
-
params(threshold: String, total_amount: String).returns(
|
|
1011
|
-
T.attached_class
|
|
1012
|
-
)
|
|
1013
|
-
end
|
|
1014
|
-
def self.new(
|
|
1015
|
-
threshold:,
|
|
1016
|
-
# Total amount for this threshold
|
|
1017
|
-
total_amount:
|
|
1018
|
-
)
|
|
1019
|
-
end
|
|
1020
|
-
|
|
1021
|
-
sig { override.returns({ threshold: String, total_amount: String }) }
|
|
1022
|
-
def to_hash
|
|
1023
|
-
end
|
|
1024
|
-
end
|
|
1025
|
-
end
|
|
1026
|
-
|
|
1027
|
-
class TieredPackageConfig < Orb::Internal::Type::BaseModel
|
|
1028
|
-
OrHash =
|
|
1029
|
-
T.type_alias do
|
|
1030
|
-
T.any(
|
|
1031
|
-
Orb::PriceCreateParams::TieredPackageConfig,
|
|
1032
|
-
Orb::Internal::AnyHash
|
|
1033
|
-
)
|
|
1034
|
-
end
|
|
1035
|
-
|
|
1036
|
-
sig { returns(String) }
|
|
1037
|
-
attr_accessor :package_size
|
|
1038
|
-
|
|
1039
|
-
# Apply tiered pricing after rounding up the quantity to the package size. Tiers
|
|
1040
|
-
# are defined using exclusive lower bounds. The tier bounds are defined based on
|
|
1041
|
-
# the total quantity rather than the number of packages, so they must be multiples
|
|
1042
|
-
# of the package size.
|
|
1043
|
-
sig do
|
|
1044
|
-
returns(T::Array[Orb::PriceCreateParams::TieredPackageConfig::Tier])
|
|
1045
|
-
end
|
|
1046
|
-
attr_accessor :tiers
|
|
1047
|
-
|
|
1048
|
-
# Configuration for tiered_package pricing
|
|
1049
|
-
sig do
|
|
1050
|
-
params(
|
|
1051
|
-
package_size: String,
|
|
1052
|
-
tiers:
|
|
1053
|
-
T::Array[
|
|
1054
|
-
Orb::PriceCreateParams::TieredPackageConfig::Tier::OrHash
|
|
1055
|
-
]
|
|
1056
|
-
).returns(T.attached_class)
|
|
1057
|
-
end
|
|
1058
|
-
def self.new(
|
|
1059
|
-
package_size:,
|
|
1060
|
-
# Apply tiered pricing after rounding up the quantity to the package size. Tiers
|
|
1061
|
-
# are defined using exclusive lower bounds. The tier bounds are defined based on
|
|
1062
|
-
# the total quantity rather than the number of packages, so they must be multiples
|
|
1063
|
-
# of the package size.
|
|
1064
|
-
tiers:
|
|
1065
|
-
)
|
|
1066
|
-
end
|
|
1067
|
-
|
|
1068
|
-
sig do
|
|
1069
|
-
override.returns(
|
|
1070
|
-
{
|
|
1071
|
-
package_size: String,
|
|
1072
|
-
tiers: T::Array[Orb::PriceCreateParams::TieredPackageConfig::Tier]
|
|
1073
|
-
}
|
|
1074
|
-
)
|
|
1075
|
-
end
|
|
1076
|
-
def to_hash
|
|
1077
|
-
end
|
|
1078
|
-
|
|
1079
|
-
class Tier < Orb::Internal::Type::BaseModel
|
|
1080
|
-
OrHash =
|
|
1081
|
-
T.type_alias do
|
|
1082
|
-
T.any(
|
|
1083
|
-
Orb::PriceCreateParams::TieredPackageConfig::Tier,
|
|
1084
|
-
Orb::Internal::AnyHash
|
|
1085
|
-
)
|
|
1086
|
-
end
|
|
1087
|
-
|
|
1088
|
-
# Price per package
|
|
1089
|
-
sig { returns(String) }
|
|
1090
|
-
attr_accessor :per_unit
|
|
1091
|
-
|
|
1092
|
-
sig { returns(String) }
|
|
1093
|
-
attr_accessor :tier_lower_bound
|
|
1094
|
-
|
|
1095
|
-
# Configuration for a single tier with business logic
|
|
1096
|
-
sig do
|
|
1097
|
-
params(per_unit: String, tier_lower_bound: String).returns(
|
|
1098
|
-
T.attached_class
|
|
1099
|
-
)
|
|
1100
|
-
end
|
|
1101
|
-
def self.new(
|
|
1102
|
-
# Price per package
|
|
1103
|
-
per_unit:,
|
|
1104
|
-
tier_lower_bound:
|
|
1105
|
-
)
|
|
1106
|
-
end
|
|
1107
|
-
|
|
1108
|
-
sig do
|
|
1109
|
-
override.returns({ per_unit: String, tier_lower_bound: String })
|
|
1110
|
-
end
|
|
1111
|
-
def to_hash
|
|
1112
|
-
end
|
|
1113
|
-
end
|
|
1114
|
-
end
|
|
1115
|
-
|
|
1116
|
-
class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel
|
|
1117
|
-
OrHash =
|
|
1118
|
-
T.type_alias do
|
|
1119
|
-
T.any(
|
|
1120
|
-
Orb::PriceCreateParams::TieredWithMinimumConfig,
|
|
1121
|
-
Orb::Internal::AnyHash
|
|
1122
|
-
)
|
|
1123
|
-
end
|
|
1124
|
-
|
|
1125
|
-
# Tiered pricing with a minimum amount dependent on the volume tier. Tiers are
|
|
1126
|
-
# defined using exclusive lower bounds.
|
|
1127
|
-
sig do
|
|
1128
|
-
returns(
|
|
1129
|
-
T::Array[Orb::PriceCreateParams::TieredWithMinimumConfig::Tier]
|
|
1130
|
-
)
|
|
1131
|
-
end
|
|
1132
|
-
attr_accessor :tiers
|
|
1133
|
-
|
|
1134
|
-
# If true, tiers with an accrued amount of 0 will not be included in the rating.
|
|
1135
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
1136
|
-
attr_reader :hide_zero_amount_tiers
|
|
1137
|
-
|
|
1138
|
-
sig { params(hide_zero_amount_tiers: T::Boolean).void }
|
|
1139
|
-
attr_writer :hide_zero_amount_tiers
|
|
1140
|
-
|
|
1141
|
-
# If true, the unit price will be prorated to the billing period
|
|
1142
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
1143
|
-
attr_reader :prorate
|
|
1144
|
-
|
|
1145
|
-
sig { params(prorate: T::Boolean).void }
|
|
1146
|
-
attr_writer :prorate
|
|
1147
|
-
|
|
1148
|
-
# Configuration for tiered_with_minimum pricing
|
|
1149
|
-
sig do
|
|
1150
|
-
params(
|
|
1151
|
-
tiers:
|
|
1152
|
-
T::Array[
|
|
1153
|
-
Orb::PriceCreateParams::TieredWithMinimumConfig::Tier::OrHash
|
|
1154
|
-
],
|
|
1155
|
-
hide_zero_amount_tiers: T::Boolean,
|
|
1156
|
-
prorate: T::Boolean
|
|
1157
|
-
).returns(T.attached_class)
|
|
1158
|
-
end
|
|
1159
|
-
def self.new(
|
|
1160
|
-
# Tiered pricing with a minimum amount dependent on the volume tier. Tiers are
|
|
1161
|
-
# defined using exclusive lower bounds.
|
|
1162
|
-
tiers:,
|
|
1163
|
-
# If true, tiers with an accrued amount of 0 will not be included in the rating.
|
|
1164
|
-
hide_zero_amount_tiers: nil,
|
|
1165
|
-
# If true, the unit price will be prorated to the billing period
|
|
1166
|
-
prorate: nil
|
|
1167
|
-
)
|
|
1168
|
-
end
|
|
1169
|
-
|
|
1170
|
-
sig do
|
|
1171
|
-
override.returns(
|
|
1172
|
-
{
|
|
1173
|
-
tiers:
|
|
1174
|
-
T::Array[Orb::PriceCreateParams::TieredWithMinimumConfig::Tier],
|
|
1175
|
-
hide_zero_amount_tiers: T::Boolean,
|
|
1176
|
-
prorate: T::Boolean
|
|
1177
|
-
}
|
|
1178
|
-
)
|
|
1179
|
-
end
|
|
1180
|
-
def to_hash
|
|
1181
|
-
end
|
|
1182
|
-
|
|
1183
|
-
class Tier < Orb::Internal::Type::BaseModel
|
|
1184
|
-
OrHash =
|
|
1185
|
-
T.type_alias do
|
|
1186
|
-
T.any(
|
|
1187
|
-
Orb::PriceCreateParams::TieredWithMinimumConfig::Tier,
|
|
1188
|
-
Orb::Internal::AnyHash
|
|
1189
|
-
)
|
|
1190
|
-
end
|
|
1191
|
-
|
|
1192
|
-
sig { returns(String) }
|
|
1193
|
-
attr_accessor :minimum_amount
|
|
1194
|
-
|
|
1195
|
-
sig { returns(String) }
|
|
1196
|
-
attr_accessor :tier_lower_bound
|
|
1197
|
-
|
|
1198
|
-
# Per unit amount
|
|
1199
|
-
sig { returns(String) }
|
|
1200
|
-
attr_accessor :unit_amount
|
|
1201
|
-
|
|
1202
|
-
# Configuration for a single tier
|
|
1203
|
-
sig do
|
|
1204
|
-
params(
|
|
1205
|
-
minimum_amount: String,
|
|
1206
|
-
tier_lower_bound: String,
|
|
1207
|
-
unit_amount: String
|
|
1208
|
-
).returns(T.attached_class)
|
|
1209
|
-
end
|
|
1210
|
-
def self.new(
|
|
1211
|
-
minimum_amount:,
|
|
1212
|
-
tier_lower_bound:,
|
|
1213
|
-
# Per unit amount
|
|
1214
|
-
unit_amount:
|
|
1215
|
-
)
|
|
1216
|
-
end
|
|
1217
|
-
|
|
1218
|
-
sig do
|
|
1219
|
-
override.returns(
|
|
1220
|
-
{
|
|
1221
|
-
minimum_amount: String,
|
|
1222
|
-
tier_lower_bound: String,
|
|
1223
|
-
unit_amount: String
|
|
1224
|
-
}
|
|
1225
|
-
)
|
|
1226
|
-
end
|
|
1227
|
-
def to_hash
|
|
1228
|
-
end
|
|
1229
|
-
end
|
|
1230
|
-
end
|
|
1231
|
-
|
|
1232
|
-
class GroupedTieredConfig < Orb::Internal::Type::BaseModel
|
|
1233
|
-
OrHash =
|
|
1234
|
-
T.type_alias do
|
|
1235
|
-
T.any(
|
|
1236
|
-
Orb::PriceCreateParams::GroupedTieredConfig,
|
|
1237
|
-
Orb::Internal::AnyHash
|
|
1238
|
-
)
|
|
1239
|
-
end
|
|
1240
|
-
|
|
1241
|
-
# The billable metric property used to group before tiering
|
|
1242
|
-
sig { returns(String) }
|
|
1243
|
-
attr_accessor :grouping_key
|
|
1244
|
-
|
|
1245
|
-
# Apply tiered pricing to each segment generated after grouping with the provided
|
|
1246
|
-
# key
|
|
1247
|
-
sig do
|
|
1248
|
-
returns(T::Array[Orb::PriceCreateParams::GroupedTieredConfig::Tier])
|
|
1249
|
-
end
|
|
1250
|
-
attr_accessor :tiers
|
|
1251
|
-
|
|
1252
|
-
# Configuration for grouped_tiered pricing
|
|
1253
|
-
sig do
|
|
1254
|
-
params(
|
|
1255
|
-
grouping_key: String,
|
|
1256
|
-
tiers:
|
|
1257
|
-
T::Array[
|
|
1258
|
-
Orb::PriceCreateParams::GroupedTieredConfig::Tier::OrHash
|
|
1259
|
-
]
|
|
1260
|
-
).returns(T.attached_class)
|
|
1261
|
-
end
|
|
1262
|
-
def self.new(
|
|
1263
|
-
# The billable metric property used to group before tiering
|
|
1264
|
-
grouping_key:,
|
|
1265
|
-
# Apply tiered pricing to each segment generated after grouping with the provided
|
|
1266
|
-
# key
|
|
1267
|
-
tiers:
|
|
1268
|
-
)
|
|
1269
|
-
end
|
|
1270
|
-
|
|
1271
|
-
sig do
|
|
1272
|
-
override.returns(
|
|
1273
|
-
{
|
|
1274
|
-
grouping_key: String,
|
|
1275
|
-
tiers: T::Array[Orb::PriceCreateParams::GroupedTieredConfig::Tier]
|
|
1276
|
-
}
|
|
1277
|
-
)
|
|
1278
|
-
end
|
|
1279
|
-
def to_hash
|
|
1280
|
-
end
|
|
1281
|
-
|
|
1282
|
-
class Tier < Orb::Internal::Type::BaseModel
|
|
1283
|
-
OrHash =
|
|
1284
|
-
T.type_alias do
|
|
1285
|
-
T.any(
|
|
1286
|
-
Orb::PriceCreateParams::GroupedTieredConfig::Tier,
|
|
1287
|
-
Orb::Internal::AnyHash
|
|
1288
|
-
)
|
|
1289
|
-
end
|
|
1290
|
-
|
|
1291
|
-
sig { returns(String) }
|
|
1292
|
-
attr_accessor :tier_lower_bound
|
|
1293
|
-
|
|
1294
|
-
# Per unit amount
|
|
1295
|
-
sig { returns(String) }
|
|
1296
|
-
attr_accessor :unit_amount
|
|
1297
|
-
|
|
1298
|
-
# Configuration for a single tier
|
|
1299
|
-
sig do
|
|
1300
|
-
params(tier_lower_bound: String, unit_amount: String).returns(
|
|
1301
|
-
T.attached_class
|
|
1302
|
-
)
|
|
1303
|
-
end
|
|
1304
|
-
def self.new(
|
|
1305
|
-
tier_lower_bound:,
|
|
1306
|
-
# Per unit amount
|
|
1307
|
-
unit_amount:
|
|
1308
|
-
)
|
|
1309
|
-
end
|
|
1310
|
-
|
|
1311
|
-
sig do
|
|
1312
|
-
override.returns({ tier_lower_bound: String, unit_amount: String })
|
|
1313
|
-
end
|
|
1314
|
-
def to_hash
|
|
1315
|
-
end
|
|
1316
|
-
end
|
|
1317
|
-
end
|
|
1318
|
-
|
|
1319
|
-
class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel
|
|
1320
|
-
OrHash =
|
|
1321
|
-
T.type_alias do
|
|
1322
|
-
T.any(
|
|
1323
|
-
Orb::PriceCreateParams::TieredPackageWithMinimumConfig,
|
|
1324
|
-
Orb::Internal::AnyHash
|
|
1325
|
-
)
|
|
1326
|
-
end
|
|
1327
|
-
|
|
1328
|
-
sig { returns(Float) }
|
|
1329
|
-
attr_accessor :package_size
|
|
1330
|
-
|
|
1331
|
-
# Apply tiered pricing after rounding up the quantity to the package size. Tiers
|
|
1332
|
-
# are defined using exclusive lower bounds.
|
|
1333
|
-
sig do
|
|
1334
|
-
returns(
|
|
1335
|
-
T::Array[
|
|
1336
|
-
Orb::PriceCreateParams::TieredPackageWithMinimumConfig::Tier
|
|
1337
|
-
]
|
|
12
|
+
# New floating price request body params.
|
|
13
|
+
sig do
|
|
14
|
+
returns(
|
|
15
|
+
T.any(
|
|
16
|
+
Orb::NewFloatingUnitPrice,
|
|
17
|
+
Orb::NewFloatingTieredPrice,
|
|
18
|
+
Orb::NewFloatingBulkPrice,
|
|
19
|
+
Orb::PriceCreateParams::Body::BulkWithFilters,
|
|
20
|
+
Orb::NewFloatingPackagePrice,
|
|
21
|
+
Orb::NewFloatingMatrixPrice,
|
|
22
|
+
Orb::NewFloatingThresholdTotalAmountPrice,
|
|
23
|
+
Orb::NewFloatingTieredPackagePrice,
|
|
24
|
+
Orb::NewFloatingTieredWithMinimumPrice,
|
|
25
|
+
Orb::NewFloatingGroupedTieredPrice,
|
|
26
|
+
Orb::NewFloatingTieredPackageWithMinimumPrice,
|
|
27
|
+
Orb::NewFloatingPackageWithAllocationPrice,
|
|
28
|
+
Orb::NewFloatingUnitWithPercentPrice,
|
|
29
|
+
Orb::NewFloatingMatrixWithAllocationPrice,
|
|
30
|
+
Orb::NewFloatingTieredWithProrationPrice,
|
|
31
|
+
Orb::NewFloatingUnitWithProrationPrice,
|
|
32
|
+
Orb::NewFloatingGroupedAllocationPrice,
|
|
33
|
+
Orb::NewFloatingBulkWithProrationPrice,
|
|
34
|
+
Orb::NewFloatingGroupedWithProratedMinimumPrice,
|
|
35
|
+
Orb::NewFloatingGroupedWithMeteredMinimumPrice,
|
|
36
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds,
|
|
37
|
+
Orb::NewFloatingMatrixWithDisplayNamePrice,
|
|
38
|
+
Orb::NewFloatingGroupedTieredPackagePrice,
|
|
39
|
+
Orb::NewFloatingMaxGroupTieredPackagePrice,
|
|
40
|
+
Orb::NewFloatingScalableMatrixWithUnitPricingPrice,
|
|
41
|
+
Orb::NewFloatingScalableMatrixWithTieredPricingPrice,
|
|
42
|
+
Orb::NewFloatingCumulativeGroupedBulkPrice,
|
|
43
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation,
|
|
44
|
+
Orb::NewFloatingMinimumCompositePrice,
|
|
45
|
+
Orb::PriceCreateParams::Body::Percent,
|
|
46
|
+
Orb::PriceCreateParams::Body::EventOutput
|
|
1338
47
|
)
|
|
1339
|
-
end
|
|
1340
|
-
attr_accessor :tiers
|
|
1341
|
-
|
|
1342
|
-
# Configuration for tiered_package_with_minimum pricing
|
|
1343
|
-
sig do
|
|
1344
|
-
params(
|
|
1345
|
-
package_size: Float,
|
|
1346
|
-
tiers:
|
|
1347
|
-
T::Array[
|
|
1348
|
-
Orb::PriceCreateParams::TieredPackageWithMinimumConfig::Tier::OrHash
|
|
1349
|
-
]
|
|
1350
|
-
).returns(T.attached_class)
|
|
1351
|
-
end
|
|
1352
|
-
def self.new(
|
|
1353
|
-
package_size:,
|
|
1354
|
-
# Apply tiered pricing after rounding up the quantity to the package size. Tiers
|
|
1355
|
-
# are defined using exclusive lower bounds.
|
|
1356
|
-
tiers:
|
|
1357
48
|
)
|
|
1358
|
-
end
|
|
1359
|
-
|
|
1360
|
-
sig do
|
|
1361
|
-
override.returns(
|
|
1362
|
-
{
|
|
1363
|
-
package_size: Float,
|
|
1364
|
-
tiers:
|
|
1365
|
-
T::Array[
|
|
1366
|
-
Orb::PriceCreateParams::TieredPackageWithMinimumConfig::Tier
|
|
1367
|
-
]
|
|
1368
|
-
}
|
|
1369
|
-
)
|
|
1370
|
-
end
|
|
1371
|
-
def to_hash
|
|
1372
|
-
end
|
|
1373
|
-
|
|
1374
|
-
class Tier < Orb::Internal::Type::BaseModel
|
|
1375
|
-
OrHash =
|
|
1376
|
-
T.type_alias do
|
|
1377
|
-
T.any(
|
|
1378
|
-
Orb::PriceCreateParams::TieredPackageWithMinimumConfig::Tier,
|
|
1379
|
-
Orb::Internal::AnyHash
|
|
1380
|
-
)
|
|
1381
|
-
end
|
|
1382
|
-
|
|
1383
|
-
sig { returns(String) }
|
|
1384
|
-
attr_accessor :minimum_amount
|
|
1385
|
-
|
|
1386
|
-
sig { returns(String) }
|
|
1387
|
-
attr_accessor :per_unit
|
|
1388
|
-
|
|
1389
|
-
sig { returns(String) }
|
|
1390
|
-
attr_accessor :tier_lower_bound
|
|
1391
|
-
|
|
1392
|
-
# Configuration for a single tier
|
|
1393
|
-
sig do
|
|
1394
|
-
params(
|
|
1395
|
-
minimum_amount: String,
|
|
1396
|
-
per_unit: String,
|
|
1397
|
-
tier_lower_bound: String
|
|
1398
|
-
).returns(T.attached_class)
|
|
1399
|
-
end
|
|
1400
|
-
def self.new(minimum_amount:, per_unit:, tier_lower_bound:)
|
|
1401
|
-
end
|
|
1402
|
-
|
|
1403
|
-
sig do
|
|
1404
|
-
override.returns(
|
|
1405
|
-
{
|
|
1406
|
-
minimum_amount: String,
|
|
1407
|
-
per_unit: String,
|
|
1408
|
-
tier_lower_bound: String
|
|
1409
|
-
}
|
|
1410
|
-
)
|
|
1411
|
-
end
|
|
1412
|
-
def to_hash
|
|
1413
|
-
end
|
|
1414
|
-
end
|
|
1415
49
|
end
|
|
50
|
+
attr_accessor :body
|
|
1416
51
|
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
52
|
+
sig do
|
|
53
|
+
params(
|
|
54
|
+
body:
|
|
1420
55
|
T.any(
|
|
1421
|
-
Orb::
|
|
1422
|
-
Orb::
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
56
|
+
Orb::NewFloatingUnitPrice::OrHash,
|
|
57
|
+
Orb::NewFloatingTieredPrice::OrHash,
|
|
58
|
+
Orb::NewFloatingBulkPrice::OrHash,
|
|
59
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::OrHash,
|
|
60
|
+
Orb::NewFloatingPackagePrice::OrHash,
|
|
61
|
+
Orb::NewFloatingMatrixPrice::OrHash,
|
|
62
|
+
Orb::NewFloatingThresholdTotalAmountPrice::OrHash,
|
|
63
|
+
Orb::NewFloatingTieredPackagePrice::OrHash,
|
|
64
|
+
Orb::NewFloatingTieredWithMinimumPrice::OrHash,
|
|
65
|
+
Orb::NewFloatingGroupedTieredPrice::OrHash,
|
|
66
|
+
Orb::NewFloatingTieredPackageWithMinimumPrice::OrHash,
|
|
67
|
+
Orb::NewFloatingPackageWithAllocationPrice::OrHash,
|
|
68
|
+
Orb::NewFloatingUnitWithPercentPrice::OrHash,
|
|
69
|
+
Orb::NewFloatingMatrixWithAllocationPrice::OrHash,
|
|
70
|
+
Orb::NewFloatingTieredWithProrationPrice::OrHash,
|
|
71
|
+
Orb::NewFloatingUnitWithProrationPrice::OrHash,
|
|
72
|
+
Orb::NewFloatingGroupedAllocationPrice::OrHash,
|
|
73
|
+
Orb::NewFloatingBulkWithProrationPrice::OrHash,
|
|
74
|
+
Orb::NewFloatingGroupedWithProratedMinimumPrice::OrHash,
|
|
75
|
+
Orb::NewFloatingGroupedWithMeteredMinimumPrice::OrHash,
|
|
76
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::OrHash,
|
|
77
|
+
Orb::NewFloatingMatrixWithDisplayNamePrice::OrHash,
|
|
78
|
+
Orb::NewFloatingGroupedTieredPackagePrice::OrHash,
|
|
79
|
+
Orb::NewFloatingMaxGroupTieredPackagePrice::OrHash,
|
|
80
|
+
Orb::NewFloatingScalableMatrixWithUnitPricingPrice::OrHash,
|
|
81
|
+
Orb::NewFloatingScalableMatrixWithTieredPricingPrice::OrHash,
|
|
82
|
+
Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash,
|
|
83
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::OrHash,
|
|
84
|
+
Orb::NewFloatingMinimumCompositePrice::OrHash,
|
|
85
|
+
Orb::PriceCreateParams::Body::Percent::OrHash,
|
|
86
|
+
Orb::PriceCreateParams::Body::EventOutput::OrHash
|
|
87
|
+
),
|
|
88
|
+
request_options: Orb::RequestOptions::OrHash
|
|
89
|
+
).returns(T.attached_class)
|
|
90
|
+
end
|
|
91
|
+
def self.new(
|
|
92
|
+
# New floating price request body params.
|
|
93
|
+
body:,
|
|
94
|
+
request_options: {}
|
|
95
|
+
)
|
|
1453
96
|
end
|
|
1454
97
|
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
98
|
+
sig do
|
|
99
|
+
override.returns(
|
|
100
|
+
{
|
|
101
|
+
body:
|
|
102
|
+
T.any(
|
|
103
|
+
Orb::NewFloatingUnitPrice,
|
|
104
|
+
Orb::NewFloatingTieredPrice,
|
|
105
|
+
Orb::NewFloatingBulkPrice,
|
|
106
|
+
Orb::PriceCreateParams::Body::BulkWithFilters,
|
|
107
|
+
Orb::NewFloatingPackagePrice,
|
|
108
|
+
Orb::NewFloatingMatrixPrice,
|
|
109
|
+
Orb::NewFloatingThresholdTotalAmountPrice,
|
|
110
|
+
Orb::NewFloatingTieredPackagePrice,
|
|
111
|
+
Orb::NewFloatingTieredWithMinimumPrice,
|
|
112
|
+
Orb::NewFloatingGroupedTieredPrice,
|
|
113
|
+
Orb::NewFloatingTieredPackageWithMinimumPrice,
|
|
114
|
+
Orb::NewFloatingPackageWithAllocationPrice,
|
|
115
|
+
Orb::NewFloatingUnitWithPercentPrice,
|
|
116
|
+
Orb::NewFloatingMatrixWithAllocationPrice,
|
|
117
|
+
Orb::NewFloatingTieredWithProrationPrice,
|
|
118
|
+
Orb::NewFloatingUnitWithProrationPrice,
|
|
119
|
+
Orb::NewFloatingGroupedAllocationPrice,
|
|
120
|
+
Orb::NewFloatingBulkWithProrationPrice,
|
|
121
|
+
Orb::NewFloatingGroupedWithProratedMinimumPrice,
|
|
122
|
+
Orb::NewFloatingGroupedWithMeteredMinimumPrice,
|
|
123
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds,
|
|
124
|
+
Orb::NewFloatingMatrixWithDisplayNamePrice,
|
|
125
|
+
Orb::NewFloatingGroupedTieredPackagePrice,
|
|
126
|
+
Orb::NewFloatingMaxGroupTieredPackagePrice,
|
|
127
|
+
Orb::NewFloatingScalableMatrixWithUnitPricingPrice,
|
|
128
|
+
Orb::NewFloatingScalableMatrixWithTieredPricingPrice,
|
|
129
|
+
Orb::NewFloatingCumulativeGroupedBulkPrice,
|
|
130
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation,
|
|
131
|
+
Orb::NewFloatingMinimumCompositePrice,
|
|
132
|
+
Orb::PriceCreateParams::Body::Percent,
|
|
133
|
+
Orb::PriceCreateParams::Body::EventOutput
|
|
134
|
+
),
|
|
135
|
+
request_options: Orb::RequestOptions
|
|
136
|
+
}
|
|
1481
137
|
)
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
sig { override.returns({ percent: String, unit_amount: String }) }
|
|
1485
|
-
def to_hash
|
|
1486
|
-
end
|
|
138
|
+
end
|
|
139
|
+
def to_hash
|
|
1487
140
|
end
|
|
1488
141
|
|
|
1489
|
-
|
|
1490
|
-
|
|
142
|
+
# New floating price request body params.
|
|
143
|
+
module Body
|
|
144
|
+
extend Orb::Internal::Type::Union
|
|
145
|
+
|
|
146
|
+
Variants =
|
|
1491
147
|
T.type_alias do
|
|
1492
148
|
T.any(
|
|
1493
|
-
Orb::
|
|
1494
|
-
Orb::
|
|
149
|
+
Orb::NewFloatingUnitPrice,
|
|
150
|
+
Orb::NewFloatingTieredPrice,
|
|
151
|
+
Orb::NewFloatingBulkPrice,
|
|
152
|
+
Orb::PriceCreateParams::Body::BulkWithFilters,
|
|
153
|
+
Orb::NewFloatingPackagePrice,
|
|
154
|
+
Orb::NewFloatingMatrixPrice,
|
|
155
|
+
Orb::NewFloatingThresholdTotalAmountPrice,
|
|
156
|
+
Orb::NewFloatingTieredPackagePrice,
|
|
157
|
+
Orb::NewFloatingTieredWithMinimumPrice,
|
|
158
|
+
Orb::NewFloatingGroupedTieredPrice,
|
|
159
|
+
Orb::NewFloatingTieredPackageWithMinimumPrice,
|
|
160
|
+
Orb::NewFloatingPackageWithAllocationPrice,
|
|
161
|
+
Orb::NewFloatingUnitWithPercentPrice,
|
|
162
|
+
Orb::NewFloatingMatrixWithAllocationPrice,
|
|
163
|
+
Orb::NewFloatingTieredWithProrationPrice,
|
|
164
|
+
Orb::NewFloatingUnitWithProrationPrice,
|
|
165
|
+
Orb::NewFloatingGroupedAllocationPrice,
|
|
166
|
+
Orb::NewFloatingBulkWithProrationPrice,
|
|
167
|
+
Orb::NewFloatingGroupedWithProratedMinimumPrice,
|
|
168
|
+
Orb::NewFloatingGroupedWithMeteredMinimumPrice,
|
|
169
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds,
|
|
170
|
+
Orb::NewFloatingMatrixWithDisplayNamePrice,
|
|
171
|
+
Orb::NewFloatingGroupedTieredPackagePrice,
|
|
172
|
+
Orb::NewFloatingMaxGroupTieredPackagePrice,
|
|
173
|
+
Orb::NewFloatingScalableMatrixWithUnitPricingPrice,
|
|
174
|
+
Orb::NewFloatingScalableMatrixWithTieredPricingPrice,
|
|
175
|
+
Orb::NewFloatingCumulativeGroupedBulkPrice,
|
|
176
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation,
|
|
177
|
+
Orb::NewFloatingMinimumCompositePrice,
|
|
178
|
+
Orb::PriceCreateParams::Body::Percent,
|
|
179
|
+
Orb::PriceCreateParams::Body::EventOutput
|
|
1495
180
|
)
|
|
1496
181
|
end
|
|
1497
182
|
|
|
1498
|
-
|
|
1499
|
-
# proration
|
|
1500
|
-
sig do
|
|
1501
|
-
returns(
|
|
1502
|
-
T::Array[Orb::PriceCreateParams::TieredWithProrationConfig::Tier]
|
|
1503
|
-
)
|
|
1504
|
-
end
|
|
1505
|
-
attr_accessor :tiers
|
|
1506
|
-
|
|
1507
|
-
# Configuration for tiered_with_proration pricing
|
|
1508
|
-
sig do
|
|
1509
|
-
params(
|
|
1510
|
-
tiers:
|
|
1511
|
-
T::Array[
|
|
1512
|
-
Orb::PriceCreateParams::TieredWithProrationConfig::Tier::OrHash
|
|
1513
|
-
]
|
|
1514
|
-
).returns(T.attached_class)
|
|
1515
|
-
end
|
|
1516
|
-
def self.new(
|
|
1517
|
-
# Tiers for rating based on total usage quantities into the specified tier with
|
|
1518
|
-
# proration
|
|
1519
|
-
tiers:
|
|
1520
|
-
)
|
|
1521
|
-
end
|
|
1522
|
-
|
|
1523
|
-
sig do
|
|
1524
|
-
override.returns(
|
|
1525
|
-
{
|
|
1526
|
-
tiers:
|
|
1527
|
-
T::Array[
|
|
1528
|
-
Orb::PriceCreateParams::TieredWithProrationConfig::Tier
|
|
1529
|
-
]
|
|
1530
|
-
}
|
|
1531
|
-
)
|
|
1532
|
-
end
|
|
1533
|
-
def to_hash
|
|
1534
|
-
end
|
|
1535
|
-
|
|
1536
|
-
class Tier < Orb::Internal::Type::BaseModel
|
|
183
|
+
class BulkWithFilters < Orb::Internal::Type::BaseModel
|
|
1537
184
|
OrHash =
|
|
1538
185
|
T.type_alias do
|
|
1539
186
|
T.any(
|
|
1540
|
-
Orb::PriceCreateParams::
|
|
187
|
+
Orb::PriceCreateParams::Body::BulkWithFilters,
|
|
1541
188
|
Orb::Internal::AnyHash
|
|
1542
189
|
)
|
|
1543
190
|
end
|
|
1544
191
|
|
|
1545
|
-
#
|
|
1546
|
-
sig { returns(String) }
|
|
1547
|
-
attr_accessor :tier_lower_bound
|
|
1548
|
-
|
|
1549
|
-
# Amount per unit
|
|
1550
|
-
sig { returns(String) }
|
|
1551
|
-
attr_accessor :unit_amount
|
|
1552
|
-
|
|
1553
|
-
# Configuration for a single tiered with proration tier
|
|
192
|
+
# Configuration for bulk_with_filters pricing
|
|
1554
193
|
sig do
|
|
1555
|
-
|
|
1556
|
-
|
|
194
|
+
returns(
|
|
195
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig
|
|
1557
196
|
)
|
|
1558
197
|
end
|
|
1559
|
-
|
|
1560
|
-
# Inclusive tier starting value
|
|
1561
|
-
tier_lower_bound:,
|
|
1562
|
-
# Amount per unit
|
|
1563
|
-
unit_amount:
|
|
1564
|
-
)
|
|
1565
|
-
end
|
|
198
|
+
attr_reader :bulk_with_filters_config
|
|
1566
199
|
|
|
1567
200
|
sig do
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
201
|
+
params(
|
|
202
|
+
bulk_with_filters_config:
|
|
203
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::OrHash
|
|
204
|
+
).void
|
|
1571
205
|
end
|
|
1572
|
-
|
|
1573
|
-
end
|
|
206
|
+
attr_writer :bulk_with_filters_config
|
|
1574
207
|
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
Orb::PriceCreateParams::UnitWithProrationConfig,
|
|
1580
|
-
Orb::Internal::AnyHash
|
|
208
|
+
# The cadence to bill for this price on.
|
|
209
|
+
sig do
|
|
210
|
+
returns(
|
|
211
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::Cadence::OrSymbol
|
|
1581
212
|
)
|
|
1582
213
|
end
|
|
214
|
+
attr_accessor :cadence
|
|
1583
215
|
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
216
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
217
|
+
sig { returns(String) }
|
|
218
|
+
attr_accessor :currency
|
|
1587
219
|
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
# Rate per unit of usage
|
|
1592
|
-
unit_amount:
|
|
1593
|
-
)
|
|
1594
|
-
end
|
|
220
|
+
# The id of the item the price will be associated with.
|
|
221
|
+
sig { returns(String) }
|
|
222
|
+
attr_accessor :item_id
|
|
1595
223
|
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
end
|
|
224
|
+
# The pricing model type
|
|
225
|
+
sig { returns(Symbol) }
|
|
226
|
+
attr_accessor :model_type
|
|
1600
227
|
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
T.any(
|
|
1605
|
-
Orb::PriceCreateParams::GroupedAllocationConfig,
|
|
1606
|
-
Orb::Internal::AnyHash
|
|
1607
|
-
)
|
|
1608
|
-
end
|
|
228
|
+
# The name of the price.
|
|
229
|
+
sig { returns(String) }
|
|
230
|
+
attr_accessor :name
|
|
1609
231
|
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
232
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
233
|
+
# usage-based.
|
|
234
|
+
sig { returns(T.nilable(String)) }
|
|
235
|
+
attr_accessor :billable_metric_id
|
|
1613
236
|
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
237
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
238
|
+
# this is true, and in-arrears if this is false.
|
|
239
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
240
|
+
attr_accessor :billed_in_advance
|
|
1617
241
|
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
242
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
243
|
+
# months.
|
|
244
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
245
|
+
attr_reader :billing_cycle_configuration
|
|
1621
246
|
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
end
|
|
1630
|
-
def self.new(
|
|
1631
|
-
# Usage allocation per group
|
|
1632
|
-
allocation:,
|
|
1633
|
-
# How to determine the groups that should each be allocated some quantity
|
|
1634
|
-
grouping_key:,
|
|
1635
|
-
# Unit rate for post-allocation
|
|
1636
|
-
overage_unit_rate:
|
|
1637
|
-
)
|
|
1638
|
-
end
|
|
247
|
+
sig do
|
|
248
|
+
params(
|
|
249
|
+
billing_cycle_configuration:
|
|
250
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
251
|
+
).void
|
|
252
|
+
end
|
|
253
|
+
attr_writer :billing_cycle_configuration
|
|
1639
254
|
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
allocation: String,
|
|
1644
|
-
grouping_key: String,
|
|
1645
|
-
overage_unit_rate: String
|
|
1646
|
-
}
|
|
1647
|
-
)
|
|
1648
|
-
end
|
|
1649
|
-
def to_hash
|
|
1650
|
-
end
|
|
1651
|
-
end
|
|
255
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
256
|
+
sig { returns(T.nilable(Float)) }
|
|
257
|
+
attr_accessor :conversion_rate
|
|
1652
258
|
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
259
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
260
|
+
sig do
|
|
261
|
+
returns(
|
|
262
|
+
T.nilable(
|
|
263
|
+
T.any(
|
|
264
|
+
Orb::UnitConversionRateConfig,
|
|
265
|
+
Orb::TieredConversionRateConfig
|
|
266
|
+
)
|
|
267
|
+
)
|
|
1659
268
|
)
|
|
1660
269
|
end
|
|
270
|
+
attr_accessor :conversion_rate_config
|
|
1661
271
|
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
T::Array[Orb::PriceCreateParams::BulkWithProrationConfig::Tier]
|
|
1666
|
-
)
|
|
1667
|
-
end
|
|
1668
|
-
attr_accessor :tiers
|
|
272
|
+
# For dimensional price: specifies a price group and dimension values
|
|
273
|
+
sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
|
|
274
|
+
attr_reader :dimensional_price_configuration
|
|
1669
275
|
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
).returns(T.attached_class)
|
|
1678
|
-
end
|
|
1679
|
-
def self.new(
|
|
1680
|
-
# Bulk tiers for rating based on total usage volume
|
|
1681
|
-
tiers:
|
|
1682
|
-
)
|
|
1683
|
-
end
|
|
276
|
+
sig do
|
|
277
|
+
params(
|
|
278
|
+
dimensional_price_configuration:
|
|
279
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
|
|
280
|
+
).void
|
|
281
|
+
end
|
|
282
|
+
attr_writer :dimensional_price_configuration
|
|
1684
283
|
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
tiers:
|
|
1689
|
-
T::Array[Orb::PriceCreateParams::BulkWithProrationConfig::Tier]
|
|
1690
|
-
}
|
|
1691
|
-
)
|
|
1692
|
-
end
|
|
1693
|
-
def to_hash
|
|
1694
|
-
end
|
|
284
|
+
# An alias for the price.
|
|
285
|
+
sig { returns(T.nilable(String)) }
|
|
286
|
+
attr_accessor :external_price_id
|
|
1695
287
|
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
Orb::PriceCreateParams::BulkWithProrationConfig::Tier,
|
|
1701
|
-
Orb::Internal::AnyHash
|
|
1702
|
-
)
|
|
1703
|
-
end
|
|
288
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
289
|
+
# applied.
|
|
290
|
+
sig { returns(T.nilable(Float)) }
|
|
291
|
+
attr_accessor :fixed_price_quantity
|
|
1704
292
|
|
|
1705
|
-
#
|
|
1706
|
-
sig { returns(String) }
|
|
1707
|
-
attr_accessor :
|
|
293
|
+
# The property used to group this price on an invoice
|
|
294
|
+
sig { returns(T.nilable(String)) }
|
|
295
|
+
attr_accessor :invoice_grouping_key
|
|
1708
296
|
|
|
1709
|
-
#
|
|
297
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
298
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
299
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
300
|
+
attr_reader :invoicing_cycle_configuration
|
|
301
|
+
|
|
302
|
+
sig do
|
|
303
|
+
params(
|
|
304
|
+
invoicing_cycle_configuration:
|
|
305
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
306
|
+
).void
|
|
307
|
+
end
|
|
308
|
+
attr_writer :invoicing_cycle_configuration
|
|
309
|
+
|
|
310
|
+
# The ID of the license type to associate with this price.
|
|
1710
311
|
sig { returns(T.nilable(String)) }
|
|
1711
|
-
attr_accessor :
|
|
312
|
+
attr_accessor :license_type_id
|
|
313
|
+
|
|
314
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
315
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
316
|
+
# by setting `metadata` to `null`.
|
|
317
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
318
|
+
attr_accessor :metadata
|
|
1712
319
|
|
|
1713
|
-
# Configuration for a single bulk pricing tier with proration
|
|
1714
320
|
sig do
|
|
1715
321
|
params(
|
|
1716
|
-
|
|
1717
|
-
|
|
322
|
+
bulk_with_filters_config:
|
|
323
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::OrHash,
|
|
324
|
+
cadence:
|
|
325
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::Cadence::OrSymbol,
|
|
326
|
+
currency: String,
|
|
327
|
+
item_id: String,
|
|
328
|
+
name: String,
|
|
329
|
+
billable_metric_id: T.nilable(String),
|
|
330
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
331
|
+
billing_cycle_configuration:
|
|
332
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
333
|
+
conversion_rate: T.nilable(Float),
|
|
334
|
+
conversion_rate_config:
|
|
335
|
+
T.nilable(
|
|
336
|
+
T.any(
|
|
337
|
+
Orb::UnitConversionRateConfig::OrHash,
|
|
338
|
+
Orb::TieredConversionRateConfig::OrHash
|
|
339
|
+
)
|
|
340
|
+
),
|
|
341
|
+
dimensional_price_configuration:
|
|
342
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
|
|
343
|
+
external_price_id: T.nilable(String),
|
|
344
|
+
fixed_price_quantity: T.nilable(Float),
|
|
345
|
+
invoice_grouping_key: T.nilable(String),
|
|
346
|
+
invoicing_cycle_configuration:
|
|
347
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
348
|
+
license_type_id: T.nilable(String),
|
|
349
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
350
|
+
model_type: Symbol
|
|
1718
351
|
).returns(T.attached_class)
|
|
1719
352
|
end
|
|
1720
353
|
def self.new(
|
|
1721
|
-
#
|
|
1722
|
-
|
|
1723
|
-
# The
|
|
1724
|
-
|
|
354
|
+
# Configuration for bulk_with_filters pricing
|
|
355
|
+
bulk_with_filters_config:,
|
|
356
|
+
# The cadence to bill for this price on.
|
|
357
|
+
cadence:,
|
|
358
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
359
|
+
currency:,
|
|
360
|
+
# The id of the item the price will be associated with.
|
|
361
|
+
item_id:,
|
|
362
|
+
# The name of the price.
|
|
363
|
+
name:,
|
|
364
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
365
|
+
# usage-based.
|
|
366
|
+
billable_metric_id: nil,
|
|
367
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
368
|
+
# this is true, and in-arrears if this is false.
|
|
369
|
+
billed_in_advance: nil,
|
|
370
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
371
|
+
# months.
|
|
372
|
+
billing_cycle_configuration: nil,
|
|
373
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
374
|
+
conversion_rate: nil,
|
|
375
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
376
|
+
conversion_rate_config: nil,
|
|
377
|
+
# For dimensional price: specifies a price group and dimension values
|
|
378
|
+
dimensional_price_configuration: nil,
|
|
379
|
+
# An alias for the price.
|
|
380
|
+
external_price_id: nil,
|
|
381
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
382
|
+
# applied.
|
|
383
|
+
fixed_price_quantity: nil,
|
|
384
|
+
# The property used to group this price on an invoice
|
|
385
|
+
invoice_grouping_key: nil,
|
|
386
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
387
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
388
|
+
invoicing_cycle_configuration: nil,
|
|
389
|
+
# The ID of the license type to associate with this price.
|
|
390
|
+
license_type_id: nil,
|
|
391
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
392
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
393
|
+
# by setting `metadata` to `null`.
|
|
394
|
+
metadata: nil,
|
|
395
|
+
# The pricing model type
|
|
396
|
+
model_type: :bulk_with_filters
|
|
1725
397
|
)
|
|
1726
398
|
end
|
|
1727
399
|
|
|
1728
400
|
sig do
|
|
1729
401
|
override.returns(
|
|
1730
|
-
{
|
|
402
|
+
{
|
|
403
|
+
bulk_with_filters_config:
|
|
404
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig,
|
|
405
|
+
cadence:
|
|
406
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::Cadence::OrSymbol,
|
|
407
|
+
currency: String,
|
|
408
|
+
item_id: String,
|
|
409
|
+
model_type: Symbol,
|
|
410
|
+
name: String,
|
|
411
|
+
billable_metric_id: T.nilable(String),
|
|
412
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
413
|
+
billing_cycle_configuration:
|
|
414
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
415
|
+
conversion_rate: T.nilable(Float),
|
|
416
|
+
conversion_rate_config:
|
|
417
|
+
T.nilable(
|
|
418
|
+
T.any(
|
|
419
|
+
Orb::UnitConversionRateConfig,
|
|
420
|
+
Orb::TieredConversionRateConfig
|
|
421
|
+
)
|
|
422
|
+
),
|
|
423
|
+
dimensional_price_configuration:
|
|
424
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration),
|
|
425
|
+
external_price_id: T.nilable(String),
|
|
426
|
+
fixed_price_quantity: T.nilable(Float),
|
|
427
|
+
invoice_grouping_key: T.nilable(String),
|
|
428
|
+
invoicing_cycle_configuration:
|
|
429
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
430
|
+
license_type_id: T.nilable(String),
|
|
431
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)])
|
|
432
|
+
}
|
|
1731
433
|
)
|
|
1732
434
|
end
|
|
1733
435
|
def to_hash
|
|
1734
436
|
end
|
|
1735
|
-
end
|
|
1736
|
-
end
|
|
1737
|
-
|
|
1738
|
-
class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel
|
|
1739
|
-
OrHash =
|
|
1740
|
-
T.type_alias do
|
|
1741
|
-
T.any(
|
|
1742
|
-
Orb::PriceCreateParams::GroupedWithProratedMinimumConfig,
|
|
1743
|
-
Orb::Internal::AnyHash
|
|
1744
|
-
)
|
|
1745
|
-
end
|
|
1746
|
-
|
|
1747
|
-
# How to determine the groups that should each have a minimum
|
|
1748
|
-
sig { returns(String) }
|
|
1749
|
-
attr_accessor :grouping_key
|
|
1750
|
-
|
|
1751
|
-
# The minimum amount to charge per group
|
|
1752
|
-
sig { returns(String) }
|
|
1753
|
-
attr_accessor :minimum
|
|
1754
|
-
|
|
1755
|
-
# The amount to charge per unit
|
|
1756
|
-
sig { returns(String) }
|
|
1757
|
-
attr_accessor :unit_rate
|
|
1758
|
-
|
|
1759
|
-
# Configuration for grouped_with_prorated_minimum pricing
|
|
1760
|
-
sig do
|
|
1761
|
-
params(
|
|
1762
|
-
grouping_key: String,
|
|
1763
|
-
minimum: String,
|
|
1764
|
-
unit_rate: String
|
|
1765
|
-
).returns(T.attached_class)
|
|
1766
|
-
end
|
|
1767
|
-
def self.new(
|
|
1768
|
-
# How to determine the groups that should each have a minimum
|
|
1769
|
-
grouping_key:,
|
|
1770
|
-
# The minimum amount to charge per group
|
|
1771
|
-
minimum:,
|
|
1772
|
-
# The amount to charge per unit
|
|
1773
|
-
unit_rate:
|
|
1774
|
-
)
|
|
1775
|
-
end
|
|
1776
|
-
|
|
1777
|
-
sig do
|
|
1778
|
-
override.returns(
|
|
1779
|
-
{ grouping_key: String, minimum: String, unit_rate: String }
|
|
1780
|
-
)
|
|
1781
|
-
end
|
|
1782
|
-
def to_hash
|
|
1783
|
-
end
|
|
1784
|
-
end
|
|
1785
|
-
|
|
1786
|
-
class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel
|
|
1787
|
-
OrHash =
|
|
1788
|
-
T.type_alias do
|
|
1789
|
-
T.any(
|
|
1790
|
-
Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig,
|
|
1791
|
-
Orb::Internal::AnyHash
|
|
1792
|
-
)
|
|
1793
|
-
end
|
|
1794
|
-
|
|
1795
|
-
# Used to partition the usage into groups. The minimum amount is applied to each
|
|
1796
|
-
# group.
|
|
1797
|
-
sig { returns(String) }
|
|
1798
|
-
attr_accessor :grouping_key
|
|
1799
|
-
|
|
1800
|
-
# The minimum amount to charge per group per unit
|
|
1801
|
-
sig { returns(String) }
|
|
1802
|
-
attr_accessor :minimum_unit_amount
|
|
1803
|
-
|
|
1804
|
-
# Used to determine the unit rate
|
|
1805
|
-
sig { returns(String) }
|
|
1806
|
-
attr_accessor :pricing_key
|
|
1807
|
-
|
|
1808
|
-
# Scale the unit rates by the scaling factor.
|
|
1809
|
-
sig do
|
|
1810
|
-
returns(
|
|
1811
|
-
T::Array[
|
|
1812
|
-
Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::ScalingFactor
|
|
1813
|
-
]
|
|
1814
|
-
)
|
|
1815
|
-
end
|
|
1816
|
-
attr_accessor :scaling_factors
|
|
1817
|
-
|
|
1818
|
-
# Used to determine the unit rate scaling factor
|
|
1819
|
-
sig { returns(String) }
|
|
1820
|
-
attr_accessor :scaling_key
|
|
1821
|
-
|
|
1822
|
-
# Apply per unit pricing to each pricing value. The minimum amount is applied any
|
|
1823
|
-
# unmatched usage.
|
|
1824
|
-
sig do
|
|
1825
|
-
returns(
|
|
1826
|
-
T::Array[
|
|
1827
|
-
Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::UnitAmount
|
|
1828
|
-
]
|
|
1829
|
-
)
|
|
1830
|
-
end
|
|
1831
|
-
attr_accessor :unit_amounts
|
|
1832
437
|
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::ScalingFactor::OrHash
|
|
1842
|
-
],
|
|
1843
|
-
scaling_key: String,
|
|
1844
|
-
unit_amounts:
|
|
1845
|
-
T::Array[
|
|
1846
|
-
Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::UnitAmount::OrHash
|
|
1847
|
-
]
|
|
1848
|
-
).returns(T.attached_class)
|
|
1849
|
-
end
|
|
1850
|
-
def self.new(
|
|
1851
|
-
# Used to partition the usage into groups. The minimum amount is applied to each
|
|
1852
|
-
# group.
|
|
1853
|
-
grouping_key:,
|
|
1854
|
-
# The minimum amount to charge per group per unit
|
|
1855
|
-
minimum_unit_amount:,
|
|
1856
|
-
# Used to determine the unit rate
|
|
1857
|
-
pricing_key:,
|
|
1858
|
-
# Scale the unit rates by the scaling factor.
|
|
1859
|
-
scaling_factors:,
|
|
1860
|
-
# Used to determine the unit rate scaling factor
|
|
1861
|
-
scaling_key:,
|
|
1862
|
-
# Apply per unit pricing to each pricing value. The minimum amount is applied any
|
|
1863
|
-
# unmatched usage.
|
|
1864
|
-
unit_amounts:
|
|
1865
|
-
)
|
|
1866
|
-
end
|
|
438
|
+
class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel
|
|
439
|
+
OrHash =
|
|
440
|
+
T.type_alias do
|
|
441
|
+
T.any(
|
|
442
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig,
|
|
443
|
+
Orb::Internal::AnyHash
|
|
444
|
+
)
|
|
445
|
+
end
|
|
1867
446
|
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
grouping_key: String,
|
|
1872
|
-
minimum_unit_amount: String,
|
|
1873
|
-
pricing_key: String,
|
|
1874
|
-
scaling_factors:
|
|
447
|
+
# Property filters to apply (all must match)
|
|
448
|
+
sig do
|
|
449
|
+
returns(
|
|
1875
450
|
T::Array[
|
|
1876
|
-
Orb::PriceCreateParams::
|
|
1877
|
-
]
|
|
1878
|
-
|
|
1879
|
-
|
|
451
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Filter
|
|
452
|
+
]
|
|
453
|
+
)
|
|
454
|
+
end
|
|
455
|
+
attr_accessor :filters
|
|
456
|
+
|
|
457
|
+
# Bulk tiers for rating based on total usage volume
|
|
458
|
+
sig do
|
|
459
|
+
returns(
|
|
1880
460
|
T::Array[
|
|
1881
|
-
Orb::PriceCreateParams::
|
|
461
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Tier
|
|
1882
462
|
]
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
463
|
+
)
|
|
464
|
+
end
|
|
465
|
+
attr_accessor :tiers
|
|
466
|
+
|
|
467
|
+
# Configuration for bulk_with_filters pricing
|
|
468
|
+
sig do
|
|
469
|
+
params(
|
|
470
|
+
filters:
|
|
471
|
+
T::Array[
|
|
472
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash
|
|
473
|
+
],
|
|
474
|
+
tiers:
|
|
475
|
+
T::Array[
|
|
476
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash
|
|
477
|
+
]
|
|
478
|
+
).returns(T.attached_class)
|
|
479
|
+
end
|
|
480
|
+
def self.new(
|
|
481
|
+
# Property filters to apply (all must match)
|
|
482
|
+
filters:,
|
|
483
|
+
# Bulk tiers for rating based on total usage volume
|
|
484
|
+
tiers:
|
|
485
|
+
)
|
|
486
|
+
end
|
|
1888
487
|
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
488
|
+
sig do
|
|
489
|
+
override.returns(
|
|
490
|
+
{
|
|
491
|
+
filters:
|
|
492
|
+
T::Array[
|
|
493
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Filter
|
|
494
|
+
],
|
|
495
|
+
tiers:
|
|
496
|
+
T::Array[
|
|
497
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Tier
|
|
498
|
+
]
|
|
499
|
+
}
|
|
1895
500
|
)
|
|
1896
501
|
end
|
|
502
|
+
def to_hash
|
|
503
|
+
end
|
|
1897
504
|
|
|
1898
|
-
|
|
1899
|
-
|
|
505
|
+
class Filter < Orb::Internal::Type::BaseModel
|
|
506
|
+
OrHash =
|
|
507
|
+
T.type_alias do
|
|
508
|
+
T.any(
|
|
509
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Filter,
|
|
510
|
+
Orb::Internal::AnyHash
|
|
511
|
+
)
|
|
512
|
+
end
|
|
513
|
+
|
|
514
|
+
# Event property key to filter on
|
|
515
|
+
sig { returns(String) }
|
|
516
|
+
attr_accessor :property_key
|
|
517
|
+
|
|
518
|
+
# Event property value to match
|
|
519
|
+
sig { returns(String) }
|
|
520
|
+
attr_accessor :property_value
|
|
521
|
+
|
|
522
|
+
# Configuration for a single property filter
|
|
523
|
+
sig do
|
|
524
|
+
params(property_key: String, property_value: String).returns(
|
|
525
|
+
T.attached_class
|
|
526
|
+
)
|
|
527
|
+
end
|
|
528
|
+
def self.new(
|
|
529
|
+
# Event property key to filter on
|
|
530
|
+
property_key:,
|
|
531
|
+
# Event property value to match
|
|
532
|
+
property_value:
|
|
533
|
+
)
|
|
534
|
+
end
|
|
1900
535
|
|
|
1901
|
-
|
|
1902
|
-
|
|
536
|
+
sig do
|
|
537
|
+
override.returns(
|
|
538
|
+
{ property_key: String, property_value: String }
|
|
539
|
+
)
|
|
540
|
+
end
|
|
541
|
+
def to_hash
|
|
542
|
+
end
|
|
543
|
+
end
|
|
1903
544
|
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
545
|
+
class Tier < Orb::Internal::Type::BaseModel
|
|
546
|
+
OrHash =
|
|
547
|
+
T.type_alias do
|
|
548
|
+
T.any(
|
|
549
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Tier,
|
|
550
|
+
Orb::Internal::AnyHash
|
|
551
|
+
)
|
|
552
|
+
end
|
|
553
|
+
|
|
554
|
+
# Amount per unit
|
|
555
|
+
sig { returns(String) }
|
|
556
|
+
attr_accessor :unit_amount
|
|
557
|
+
|
|
558
|
+
# The lower bound for this tier
|
|
559
|
+
sig { returns(T.nilable(String)) }
|
|
560
|
+
attr_accessor :tier_lower_bound
|
|
561
|
+
|
|
562
|
+
# Configuration for a single bulk pricing tier
|
|
563
|
+
sig do
|
|
564
|
+
params(
|
|
565
|
+
unit_amount: String,
|
|
566
|
+
tier_lower_bound: T.nilable(String)
|
|
567
|
+
).returns(T.attached_class)
|
|
568
|
+
end
|
|
569
|
+
def self.new(
|
|
570
|
+
# Amount per unit
|
|
571
|
+
unit_amount:,
|
|
572
|
+
# The lower bound for this tier
|
|
573
|
+
tier_lower_bound: nil
|
|
574
|
+
)
|
|
575
|
+
end
|
|
1912
576
|
|
|
1913
|
-
|
|
1914
|
-
|
|
577
|
+
sig do
|
|
578
|
+
override.returns(
|
|
579
|
+
{ unit_amount: String, tier_lower_bound: T.nilable(String) }
|
|
580
|
+
)
|
|
581
|
+
end
|
|
582
|
+
def to_hash
|
|
583
|
+
end
|
|
584
|
+
end
|
|
1915
585
|
end
|
|
1916
|
-
|
|
586
|
+
|
|
587
|
+
# The cadence to bill for this price on.
|
|
588
|
+
module Cadence
|
|
589
|
+
extend Orb::Internal::Type::Enum
|
|
590
|
+
|
|
591
|
+
TaggedSymbol =
|
|
592
|
+
T.type_alias do
|
|
593
|
+
T.all(
|
|
594
|
+
Symbol,
|
|
595
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::Cadence
|
|
596
|
+
)
|
|
597
|
+
end
|
|
598
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
599
|
+
|
|
600
|
+
ANNUAL =
|
|
601
|
+
T.let(
|
|
602
|
+
:annual,
|
|
603
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::Cadence::TaggedSymbol
|
|
604
|
+
)
|
|
605
|
+
SEMI_ANNUAL =
|
|
606
|
+
T.let(
|
|
607
|
+
:semi_annual,
|
|
608
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::Cadence::TaggedSymbol
|
|
609
|
+
)
|
|
610
|
+
MONTHLY =
|
|
611
|
+
T.let(
|
|
612
|
+
:monthly,
|
|
613
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::Cadence::TaggedSymbol
|
|
614
|
+
)
|
|
615
|
+
QUARTERLY =
|
|
616
|
+
T.let(
|
|
617
|
+
:quarterly,
|
|
618
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::Cadence::TaggedSymbol
|
|
619
|
+
)
|
|
620
|
+
ONE_TIME =
|
|
621
|
+
T.let(
|
|
622
|
+
:one_time,
|
|
623
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::Cadence::TaggedSymbol
|
|
624
|
+
)
|
|
625
|
+
CUSTOM =
|
|
626
|
+
T.let(
|
|
627
|
+
:custom,
|
|
628
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::Cadence::TaggedSymbol
|
|
629
|
+
)
|
|
630
|
+
|
|
631
|
+
sig do
|
|
632
|
+
override.returns(
|
|
633
|
+
T::Array[
|
|
634
|
+
Orb::PriceCreateParams::Body::BulkWithFilters::Cadence::TaggedSymbol
|
|
635
|
+
]
|
|
636
|
+
)
|
|
637
|
+
end
|
|
638
|
+
def self.values
|
|
639
|
+
end
|
|
1917
640
|
end
|
|
1918
641
|
end
|
|
1919
642
|
|
|
1920
|
-
class
|
|
643
|
+
class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel
|
|
1921
644
|
OrHash =
|
|
1922
645
|
T.type_alias do
|
|
1923
646
|
T.any(
|
|
1924
|
-
Orb::PriceCreateParams::
|
|
647
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds,
|
|
1925
648
|
Orb::Internal::AnyHash
|
|
1926
649
|
)
|
|
1927
650
|
end
|
|
1928
651
|
|
|
1929
|
-
|
|
1930
|
-
|
|
652
|
+
# The cadence to bill for this price on.
|
|
653
|
+
sig do
|
|
654
|
+
returns(
|
|
655
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::OrSymbol
|
|
656
|
+
)
|
|
657
|
+
end
|
|
658
|
+
attr_accessor :cadence
|
|
1931
659
|
|
|
1932
|
-
#
|
|
660
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
1933
661
|
sig { returns(String) }
|
|
1934
|
-
attr_accessor :
|
|
662
|
+
attr_accessor :currency
|
|
1935
663
|
|
|
1936
|
-
# Configuration for
|
|
664
|
+
# Configuration for grouped_with_min_max_thresholds pricing
|
|
1937
665
|
sig do
|
|
1938
|
-
|
|
1939
|
-
|
|
666
|
+
returns(
|
|
667
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig
|
|
1940
668
|
)
|
|
1941
669
|
end
|
|
1942
|
-
|
|
1943
|
-
pricing_value:,
|
|
1944
|
-
# Per unit amount
|
|
1945
|
-
unit_amount:
|
|
1946
|
-
)
|
|
1947
|
-
end
|
|
670
|
+
attr_reader :grouped_with_min_max_thresholds_config
|
|
1948
671
|
|
|
1949
672
|
sig do
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
673
|
+
params(
|
|
674
|
+
grouped_with_min_max_thresholds_config:
|
|
675
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash
|
|
676
|
+
).void
|
|
1953
677
|
end
|
|
1954
|
-
|
|
1955
|
-
end
|
|
678
|
+
attr_writer :grouped_with_min_max_thresholds_config
|
|
1956
679
|
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
T.any(
|
|
1961
|
-
Orb::PriceCreateParams::GroupedWithMinMaxThresholdsConfig,
|
|
1962
|
-
Orb::Internal::AnyHash
|
|
1963
|
-
)
|
|
1964
|
-
end
|
|
680
|
+
# The id of the item the price will be associated with.
|
|
681
|
+
sig { returns(String) }
|
|
682
|
+
attr_accessor :item_id
|
|
1965
683
|
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
684
|
+
# The pricing model type
|
|
685
|
+
sig { returns(Symbol) }
|
|
686
|
+
attr_accessor :model_type
|
|
1969
687
|
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
688
|
+
# The name of the price.
|
|
689
|
+
sig { returns(String) }
|
|
690
|
+
attr_accessor :name
|
|
1973
691
|
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
692
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
693
|
+
# usage-based.
|
|
694
|
+
sig { returns(T.nilable(String)) }
|
|
695
|
+
attr_accessor :billable_metric_id
|
|
1977
696
|
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
697
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
698
|
+
# this is true, and in-arrears if this is false.
|
|
699
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
700
|
+
attr_accessor :billed_in_advance
|
|
1981
701
|
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
maximum_charge: String,
|
|
1987
|
-
minimum_charge: String,
|
|
1988
|
-
per_unit_rate: String
|
|
1989
|
-
).returns(T.attached_class)
|
|
1990
|
-
end
|
|
1991
|
-
def self.new(
|
|
1992
|
-
# The event property used to group before applying thresholds
|
|
1993
|
-
grouping_key:,
|
|
1994
|
-
# The maximum amount to charge each group
|
|
1995
|
-
maximum_charge:,
|
|
1996
|
-
# The minimum amount to charge each group, regardless of usage
|
|
1997
|
-
minimum_charge:,
|
|
1998
|
-
# The base price charged per group
|
|
1999
|
-
per_unit_rate:
|
|
2000
|
-
)
|
|
2001
|
-
end
|
|
702
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
703
|
+
# months.
|
|
704
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
705
|
+
attr_reader :billing_cycle_configuration
|
|
2002
706
|
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
}
|
|
2011
|
-
)
|
|
2012
|
-
end
|
|
2013
|
-
def to_hash
|
|
2014
|
-
end
|
|
2015
|
-
end
|
|
707
|
+
sig do
|
|
708
|
+
params(
|
|
709
|
+
billing_cycle_configuration:
|
|
710
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
711
|
+
).void
|
|
712
|
+
end
|
|
713
|
+
attr_writer :billing_cycle_configuration
|
|
2016
714
|
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
715
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
716
|
+
sig { returns(T.nilable(Float)) }
|
|
717
|
+
attr_accessor :conversion_rate
|
|
718
|
+
|
|
719
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
720
|
+
sig do
|
|
721
|
+
returns(
|
|
722
|
+
T.nilable(
|
|
723
|
+
T.any(
|
|
724
|
+
Orb::UnitConversionRateConfig,
|
|
725
|
+
Orb::TieredConversionRateConfig
|
|
726
|
+
)
|
|
727
|
+
)
|
|
2023
728
|
)
|
|
2024
729
|
end
|
|
730
|
+
attr_accessor :conversion_rate_config
|
|
2025
731
|
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
732
|
+
# For dimensional price: specifies a price group and dimension values
|
|
733
|
+
sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
|
|
734
|
+
attr_reader :dimensional_price_configuration
|
|
2029
735
|
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
end
|
|
2038
|
-
attr_accessor :unit_amounts
|
|
736
|
+
sig do
|
|
737
|
+
params(
|
|
738
|
+
dimensional_price_configuration:
|
|
739
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
|
|
740
|
+
).void
|
|
741
|
+
end
|
|
742
|
+
attr_writer :dimensional_price_configuration
|
|
2039
743
|
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
dimension: String,
|
|
2044
|
-
unit_amounts:
|
|
2045
|
-
T::Array[
|
|
2046
|
-
Orb::PriceCreateParams::MatrixWithDisplayNameConfig::UnitAmount::OrHash
|
|
2047
|
-
]
|
|
2048
|
-
).returns(T.attached_class)
|
|
2049
|
-
end
|
|
2050
|
-
def self.new(
|
|
2051
|
-
# Used to determine the unit rate
|
|
2052
|
-
dimension:,
|
|
2053
|
-
# Apply per unit pricing to each dimension value
|
|
2054
|
-
unit_amounts:
|
|
2055
|
-
)
|
|
2056
|
-
end
|
|
744
|
+
# An alias for the price.
|
|
745
|
+
sig { returns(T.nilable(String)) }
|
|
746
|
+
attr_accessor :external_price_id
|
|
2057
747
|
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
unit_amounts:
|
|
2063
|
-
T::Array[
|
|
2064
|
-
Orb::PriceCreateParams::MatrixWithDisplayNameConfig::UnitAmount
|
|
2065
|
-
]
|
|
2066
|
-
}
|
|
2067
|
-
)
|
|
2068
|
-
end
|
|
2069
|
-
def to_hash
|
|
2070
|
-
end
|
|
748
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
749
|
+
# applied.
|
|
750
|
+
sig { returns(T.nilable(Float)) }
|
|
751
|
+
attr_accessor :fixed_price_quantity
|
|
2071
752
|
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
T.any(
|
|
2076
|
-
Orb::PriceCreateParams::MatrixWithDisplayNameConfig::UnitAmount,
|
|
2077
|
-
Orb::Internal::AnyHash
|
|
2078
|
-
)
|
|
2079
|
-
end
|
|
753
|
+
# The property used to group this price on an invoice
|
|
754
|
+
sig { returns(T.nilable(String)) }
|
|
755
|
+
attr_accessor :invoice_grouping_key
|
|
2080
756
|
|
|
2081
|
-
#
|
|
2082
|
-
|
|
2083
|
-
|
|
757
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
758
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
759
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
760
|
+
attr_reader :invoicing_cycle_configuration
|
|
2084
761
|
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
762
|
+
sig do
|
|
763
|
+
params(
|
|
764
|
+
invoicing_cycle_configuration:
|
|
765
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
766
|
+
).void
|
|
767
|
+
end
|
|
768
|
+
attr_writer :invoicing_cycle_configuration
|
|
2088
769
|
|
|
2089
|
-
#
|
|
2090
|
-
sig { returns(String) }
|
|
2091
|
-
attr_accessor :
|
|
770
|
+
# The ID of the license type to associate with this price.
|
|
771
|
+
sig { returns(T.nilable(String)) }
|
|
772
|
+
attr_accessor :license_type_id
|
|
773
|
+
|
|
774
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
775
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
776
|
+
# by setting `metadata` to `null`.
|
|
777
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
778
|
+
attr_accessor :metadata
|
|
2092
779
|
|
|
2093
|
-
# Configuration for a unit amount item
|
|
2094
780
|
sig do
|
|
2095
781
|
params(
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
782
|
+
cadence:
|
|
783
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::OrSymbol,
|
|
784
|
+
currency: String,
|
|
785
|
+
grouped_with_min_max_thresholds_config:
|
|
786
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash,
|
|
787
|
+
item_id: String,
|
|
788
|
+
name: String,
|
|
789
|
+
billable_metric_id: T.nilable(String),
|
|
790
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
791
|
+
billing_cycle_configuration:
|
|
792
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
793
|
+
conversion_rate: T.nilable(Float),
|
|
794
|
+
conversion_rate_config:
|
|
795
|
+
T.nilable(
|
|
796
|
+
T.any(
|
|
797
|
+
Orb::UnitConversionRateConfig::OrHash,
|
|
798
|
+
Orb::TieredConversionRateConfig::OrHash
|
|
799
|
+
)
|
|
800
|
+
),
|
|
801
|
+
dimensional_price_configuration:
|
|
802
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
|
|
803
|
+
external_price_id: T.nilable(String),
|
|
804
|
+
fixed_price_quantity: T.nilable(Float),
|
|
805
|
+
invoice_grouping_key: T.nilable(String),
|
|
806
|
+
invoicing_cycle_configuration:
|
|
807
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
808
|
+
license_type_id: T.nilable(String),
|
|
809
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
810
|
+
model_type: Symbol
|
|
2099
811
|
).returns(T.attached_class)
|
|
2100
812
|
end
|
|
2101
813
|
def self.new(
|
|
2102
|
-
# The
|
|
2103
|
-
|
|
2104
|
-
#
|
|
2105
|
-
|
|
2106
|
-
#
|
|
2107
|
-
|
|
814
|
+
# The cadence to bill for this price on.
|
|
815
|
+
cadence:,
|
|
816
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
817
|
+
currency:,
|
|
818
|
+
# Configuration for grouped_with_min_max_thresholds pricing
|
|
819
|
+
grouped_with_min_max_thresholds_config:,
|
|
820
|
+
# The id of the item the price will be associated with.
|
|
821
|
+
item_id:,
|
|
822
|
+
# The name of the price.
|
|
823
|
+
name:,
|
|
824
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
825
|
+
# usage-based.
|
|
826
|
+
billable_metric_id: nil,
|
|
827
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
828
|
+
# this is true, and in-arrears if this is false.
|
|
829
|
+
billed_in_advance: nil,
|
|
830
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
831
|
+
# months.
|
|
832
|
+
billing_cycle_configuration: nil,
|
|
833
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
834
|
+
conversion_rate: nil,
|
|
835
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
836
|
+
conversion_rate_config: nil,
|
|
837
|
+
# For dimensional price: specifies a price group and dimension values
|
|
838
|
+
dimensional_price_configuration: nil,
|
|
839
|
+
# An alias for the price.
|
|
840
|
+
external_price_id: nil,
|
|
841
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
842
|
+
# applied.
|
|
843
|
+
fixed_price_quantity: nil,
|
|
844
|
+
# The property used to group this price on an invoice
|
|
845
|
+
invoice_grouping_key: nil,
|
|
846
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
847
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
848
|
+
invoicing_cycle_configuration: nil,
|
|
849
|
+
# The ID of the license type to associate with this price.
|
|
850
|
+
license_type_id: nil,
|
|
851
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
852
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
853
|
+
# by setting `metadata` to `null`.
|
|
854
|
+
metadata: nil,
|
|
855
|
+
# The pricing model type
|
|
856
|
+
model_type: :grouped_with_min_max_thresholds
|
|
2108
857
|
)
|
|
2109
858
|
end
|
|
2110
859
|
|
|
2111
860
|
sig do
|
|
2112
861
|
override.returns(
|
|
2113
862
|
{
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
863
|
+
cadence:
|
|
864
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::OrSymbol,
|
|
865
|
+
currency: String,
|
|
866
|
+
grouped_with_min_max_thresholds_config:
|
|
867
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig,
|
|
868
|
+
item_id: String,
|
|
869
|
+
model_type: Symbol,
|
|
870
|
+
name: String,
|
|
871
|
+
billable_metric_id: T.nilable(String),
|
|
872
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
873
|
+
billing_cycle_configuration:
|
|
874
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
875
|
+
conversion_rate: T.nilable(Float),
|
|
876
|
+
conversion_rate_config:
|
|
877
|
+
T.nilable(
|
|
878
|
+
T.any(
|
|
879
|
+
Orb::UnitConversionRateConfig,
|
|
880
|
+
Orb::TieredConversionRateConfig
|
|
881
|
+
)
|
|
882
|
+
),
|
|
883
|
+
dimensional_price_configuration:
|
|
884
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration),
|
|
885
|
+
external_price_id: T.nilable(String),
|
|
886
|
+
fixed_price_quantity: T.nilable(Float),
|
|
887
|
+
invoice_grouping_key: T.nilable(String),
|
|
888
|
+
invoicing_cycle_configuration:
|
|
889
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
890
|
+
license_type_id: T.nilable(String),
|
|
891
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)])
|
|
2117
892
|
}
|
|
2118
893
|
)
|
|
2119
894
|
end
|
|
2120
895
|
def to_hash
|
|
2121
896
|
end
|
|
2122
|
-
end
|
|
2123
|
-
end
|
|
2124
897
|
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
898
|
+
# The cadence to bill for this price on.
|
|
899
|
+
module Cadence
|
|
900
|
+
extend Orb::Internal::Type::Enum
|
|
901
|
+
|
|
902
|
+
TaggedSymbol =
|
|
903
|
+
T.type_alias do
|
|
904
|
+
T.all(
|
|
905
|
+
Symbol,
|
|
906
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence
|
|
907
|
+
)
|
|
908
|
+
end
|
|
909
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
910
|
+
|
|
911
|
+
ANNUAL =
|
|
912
|
+
T.let(
|
|
913
|
+
:annual,
|
|
914
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
915
|
+
)
|
|
916
|
+
SEMI_ANNUAL =
|
|
917
|
+
T.let(
|
|
918
|
+
:semi_annual,
|
|
919
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
920
|
+
)
|
|
921
|
+
MONTHLY =
|
|
922
|
+
T.let(
|
|
923
|
+
:monthly,
|
|
924
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
925
|
+
)
|
|
926
|
+
QUARTERLY =
|
|
927
|
+
T.let(
|
|
928
|
+
:quarterly,
|
|
929
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
930
|
+
)
|
|
931
|
+
ONE_TIME =
|
|
932
|
+
T.let(
|
|
933
|
+
:one_time,
|
|
934
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
935
|
+
)
|
|
936
|
+
CUSTOM =
|
|
937
|
+
T.let(
|
|
938
|
+
:custom,
|
|
939
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
940
|
+
)
|
|
941
|
+
|
|
942
|
+
sig do
|
|
943
|
+
override.returns(
|
|
944
|
+
T::Array[
|
|
945
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
|
|
946
|
+
]
|
|
947
|
+
)
|
|
948
|
+
end
|
|
949
|
+
def self.values
|
|
950
|
+
end
|
|
2132
951
|
end
|
|
2133
952
|
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
953
|
+
class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel
|
|
954
|
+
OrHash =
|
|
955
|
+
T.type_alias do
|
|
956
|
+
T.any(
|
|
957
|
+
Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig,
|
|
958
|
+
Orb::Internal::AnyHash
|
|
959
|
+
)
|
|
960
|
+
end
|
|
2137
961
|
|
|
2138
|
-
|
|
2139
|
-
|
|
962
|
+
# The event property used to group before applying thresholds
|
|
963
|
+
sig { returns(String) }
|
|
964
|
+
attr_accessor :grouping_key
|
|
2140
965
|
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
returns(
|
|
2145
|
-
T::Array[Orb::PriceCreateParams::GroupedTieredPackageConfig::Tier]
|
|
2146
|
-
)
|
|
2147
|
-
end
|
|
2148
|
-
attr_accessor :tiers
|
|
966
|
+
# The maximum amount to charge each group
|
|
967
|
+
sig { returns(String) }
|
|
968
|
+
attr_accessor :maximum_charge
|
|
2149
969
|
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
grouping_key: String,
|
|
2154
|
-
package_size: String,
|
|
2155
|
-
tiers:
|
|
2156
|
-
T::Array[
|
|
2157
|
-
Orb::PriceCreateParams::GroupedTieredPackageConfig::Tier::OrHash
|
|
2158
|
-
]
|
|
2159
|
-
).returns(T.attached_class)
|
|
2160
|
-
end
|
|
2161
|
-
def self.new(
|
|
2162
|
-
# The event property used to group before tiering
|
|
2163
|
-
grouping_key:,
|
|
2164
|
-
package_size:,
|
|
2165
|
-
# Apply tiered pricing after rounding up the quantity to the package size. Tiers
|
|
2166
|
-
# are defined using exclusive lower bounds.
|
|
2167
|
-
tiers:
|
|
2168
|
-
)
|
|
2169
|
-
end
|
|
970
|
+
# The minimum amount to charge each group, regardless of usage
|
|
971
|
+
sig { returns(String) }
|
|
972
|
+
attr_accessor :minimum_charge
|
|
2170
973
|
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
974
|
+
# The base price charged per group
|
|
975
|
+
sig { returns(String) }
|
|
976
|
+
attr_accessor :per_unit_rate
|
|
977
|
+
|
|
978
|
+
# Configuration for grouped_with_min_max_thresholds pricing
|
|
979
|
+
sig do
|
|
980
|
+
params(
|
|
981
|
+
grouping_key: String,
|
|
982
|
+
maximum_charge: String,
|
|
983
|
+
minimum_charge: String,
|
|
984
|
+
per_unit_rate: String
|
|
985
|
+
).returns(T.attached_class)
|
|
986
|
+
end
|
|
987
|
+
def self.new(
|
|
988
|
+
# The event property used to group before applying thresholds
|
|
989
|
+
grouping_key:,
|
|
990
|
+
# The maximum amount to charge each group
|
|
991
|
+
maximum_charge:,
|
|
992
|
+
# The minimum amount to charge each group, regardless of usage
|
|
993
|
+
minimum_charge:,
|
|
994
|
+
# The base price charged per group
|
|
995
|
+
per_unit_rate:
|
|
996
|
+
)
|
|
997
|
+
end
|
|
998
|
+
|
|
999
|
+
sig do
|
|
1000
|
+
override.returns(
|
|
1001
|
+
{
|
|
1002
|
+
grouping_key: String,
|
|
1003
|
+
maximum_charge: String,
|
|
1004
|
+
minimum_charge: String,
|
|
1005
|
+
per_unit_rate: String
|
|
1006
|
+
}
|
|
1007
|
+
)
|
|
1008
|
+
end
|
|
1009
|
+
def to_hash
|
|
1010
|
+
end
|
|
1011
|
+
end
|
|
2184
1012
|
end
|
|
2185
1013
|
|
|
2186
|
-
class
|
|
1014
|
+
class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel
|
|
2187
1015
|
OrHash =
|
|
2188
1016
|
T.type_alias do
|
|
2189
1017
|
T.any(
|
|
2190
|
-
Orb::PriceCreateParams::
|
|
1018
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation,
|
|
2191
1019
|
Orb::Internal::AnyHash
|
|
2192
1020
|
)
|
|
2193
1021
|
end
|
|
2194
1022
|
|
|
2195
|
-
#
|
|
2196
|
-
sig { returns(String) }
|
|
2197
|
-
attr_accessor :per_unit
|
|
2198
|
-
|
|
2199
|
-
sig { returns(String) }
|
|
2200
|
-
attr_accessor :tier_lower_bound
|
|
2201
|
-
|
|
2202
|
-
# Configuration for a single tier
|
|
1023
|
+
# The cadence to bill for this price on.
|
|
2203
1024
|
sig do
|
|
2204
|
-
|
|
2205
|
-
|
|
1025
|
+
returns(
|
|
1026
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::OrSymbol
|
|
2206
1027
|
)
|
|
2207
1028
|
end
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
1029
|
+
attr_accessor :cadence
|
|
1030
|
+
|
|
1031
|
+
# Configuration for cumulative_grouped_allocation pricing
|
|
1032
|
+
sig do
|
|
1033
|
+
returns(
|
|
1034
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig
|
|
1035
|
+
)
|
|
2213
1036
|
end
|
|
1037
|
+
attr_reader :cumulative_grouped_allocation_config
|
|
2214
1038
|
|
|
2215
1039
|
sig do
|
|
2216
|
-
|
|
1040
|
+
params(
|
|
1041
|
+
cumulative_grouped_allocation_config:
|
|
1042
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash
|
|
1043
|
+
).void
|
|
2217
1044
|
end
|
|
2218
|
-
|
|
1045
|
+
attr_writer :cumulative_grouped_allocation_config
|
|
1046
|
+
|
|
1047
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
1048
|
+
sig { returns(String) }
|
|
1049
|
+
attr_accessor :currency
|
|
1050
|
+
|
|
1051
|
+
# The id of the item the price will be associated with.
|
|
1052
|
+
sig { returns(String) }
|
|
1053
|
+
attr_accessor :item_id
|
|
1054
|
+
|
|
1055
|
+
# The pricing model type
|
|
1056
|
+
sig { returns(Symbol) }
|
|
1057
|
+
attr_accessor :model_type
|
|
1058
|
+
|
|
1059
|
+
# The name of the price.
|
|
1060
|
+
sig { returns(String) }
|
|
1061
|
+
attr_accessor :name
|
|
1062
|
+
|
|
1063
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1064
|
+
# usage-based.
|
|
1065
|
+
sig { returns(T.nilable(String)) }
|
|
1066
|
+
attr_accessor :billable_metric_id
|
|
1067
|
+
|
|
1068
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1069
|
+
# this is true, and in-arrears if this is false.
|
|
1070
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
1071
|
+
attr_accessor :billed_in_advance
|
|
1072
|
+
|
|
1073
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1074
|
+
# months.
|
|
1075
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1076
|
+
attr_reader :billing_cycle_configuration
|
|
1077
|
+
|
|
1078
|
+
sig do
|
|
1079
|
+
params(
|
|
1080
|
+
billing_cycle_configuration:
|
|
1081
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1082
|
+
).void
|
|
2219
1083
|
end
|
|
2220
|
-
|
|
2221
|
-
end
|
|
1084
|
+
attr_writer :billing_cycle_configuration
|
|
2222
1085
|
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
1086
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1087
|
+
sig { returns(T.nilable(Float)) }
|
|
1088
|
+
attr_accessor :conversion_rate
|
|
1089
|
+
|
|
1090
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1091
|
+
sig do
|
|
1092
|
+
returns(
|
|
1093
|
+
T.nilable(
|
|
1094
|
+
T.any(
|
|
1095
|
+
Orb::UnitConversionRateConfig,
|
|
1096
|
+
Orb::TieredConversionRateConfig
|
|
1097
|
+
)
|
|
1098
|
+
)
|
|
2229
1099
|
)
|
|
2230
1100
|
end
|
|
1101
|
+
attr_accessor :conversion_rate_config
|
|
2231
1102
|
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
1103
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1104
|
+
sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
|
|
1105
|
+
attr_reader :dimensional_price_configuration
|
|
2235
1106
|
|
|
2236
|
-
|
|
2237
|
-
|
|
1107
|
+
sig do
|
|
1108
|
+
params(
|
|
1109
|
+
dimensional_price_configuration:
|
|
1110
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
|
|
1111
|
+
).void
|
|
1112
|
+
end
|
|
1113
|
+
attr_writer :dimensional_price_configuration
|
|
2238
1114
|
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
T::Array[Orb::PriceCreateParams::MaxGroupTieredPackageConfig::Tier]
|
|
2243
|
-
)
|
|
2244
|
-
end
|
|
2245
|
-
attr_accessor :tiers
|
|
1115
|
+
# An alias for the price.
|
|
1116
|
+
sig { returns(T.nilable(String)) }
|
|
1117
|
+
attr_accessor :external_price_id
|
|
2246
1118
|
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
package_size: String,
|
|
2252
|
-
tiers:
|
|
2253
|
-
T::Array[
|
|
2254
|
-
Orb::PriceCreateParams::MaxGroupTieredPackageConfig::Tier::OrHash
|
|
2255
|
-
]
|
|
2256
|
-
).returns(T.attached_class)
|
|
2257
|
-
end
|
|
2258
|
-
def self.new(
|
|
2259
|
-
# The event property used to group before tiering the group with the highest value
|
|
2260
|
-
grouping_key:,
|
|
2261
|
-
package_size:,
|
|
2262
|
-
# Apply tiered pricing to the largest group after grouping with the provided key.
|
|
2263
|
-
tiers:
|
|
2264
|
-
)
|
|
2265
|
-
end
|
|
1119
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1120
|
+
# applied.
|
|
1121
|
+
sig { returns(T.nilable(Float)) }
|
|
1122
|
+
attr_accessor :fixed_price_quantity
|
|
2266
1123
|
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
grouping_key: String,
|
|
2271
|
-
package_size: String,
|
|
2272
|
-
tiers:
|
|
2273
|
-
T::Array[
|
|
2274
|
-
Orb::PriceCreateParams::MaxGroupTieredPackageConfig::Tier
|
|
2275
|
-
]
|
|
2276
|
-
}
|
|
2277
|
-
)
|
|
2278
|
-
end
|
|
2279
|
-
def to_hash
|
|
2280
|
-
end
|
|
1124
|
+
# The property used to group this price on an invoice
|
|
1125
|
+
sig { returns(T.nilable(String)) }
|
|
1126
|
+
attr_accessor :invoice_grouping_key
|
|
2281
1127
|
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
Orb::PriceCreateParams::MaxGroupTieredPackageConfig::Tier,
|
|
2287
|
-
Orb::Internal::AnyHash
|
|
2288
|
-
)
|
|
2289
|
-
end
|
|
1128
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1129
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1130
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1131
|
+
attr_reader :invoicing_cycle_configuration
|
|
2290
1132
|
|
|
2291
|
-
sig
|
|
2292
|
-
|
|
1133
|
+
sig do
|
|
1134
|
+
params(
|
|
1135
|
+
invoicing_cycle_configuration:
|
|
1136
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1137
|
+
).void
|
|
1138
|
+
end
|
|
1139
|
+
attr_writer :invoicing_cycle_configuration
|
|
2293
1140
|
|
|
2294
|
-
#
|
|
2295
|
-
sig { returns(String) }
|
|
2296
|
-
attr_accessor :
|
|
1141
|
+
# The ID of the license type to associate with this price.
|
|
1142
|
+
sig { returns(T.nilable(String)) }
|
|
1143
|
+
attr_accessor :license_type_id
|
|
1144
|
+
|
|
1145
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1146
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1147
|
+
# by setting `metadata` to `null`.
|
|
1148
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
1149
|
+
attr_accessor :metadata
|
|
2297
1150
|
|
|
2298
|
-
# Configuration for a single tier
|
|
2299
1151
|
sig do
|
|
2300
|
-
params(
|
|
2301
|
-
|
|
2302
|
-
|
|
1152
|
+
params(
|
|
1153
|
+
cadence:
|
|
1154
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::OrSymbol,
|
|
1155
|
+
cumulative_grouped_allocation_config:
|
|
1156
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash,
|
|
1157
|
+
currency: String,
|
|
1158
|
+
item_id: String,
|
|
1159
|
+
name: String,
|
|
1160
|
+
billable_metric_id: T.nilable(String),
|
|
1161
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1162
|
+
billing_cycle_configuration:
|
|
1163
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1164
|
+
conversion_rate: T.nilable(Float),
|
|
1165
|
+
conversion_rate_config:
|
|
1166
|
+
T.nilable(
|
|
1167
|
+
T.any(
|
|
1168
|
+
Orb::UnitConversionRateConfig::OrHash,
|
|
1169
|
+
Orb::TieredConversionRateConfig::OrHash
|
|
1170
|
+
)
|
|
1171
|
+
),
|
|
1172
|
+
dimensional_price_configuration:
|
|
1173
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
|
|
1174
|
+
external_price_id: T.nilable(String),
|
|
1175
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1176
|
+
invoice_grouping_key: T.nilable(String),
|
|
1177
|
+
invoicing_cycle_configuration:
|
|
1178
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1179
|
+
license_type_id: T.nilable(String),
|
|
1180
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
1181
|
+
model_type: Symbol
|
|
1182
|
+
).returns(T.attached_class)
|
|
2303
1183
|
end
|
|
2304
1184
|
def self.new(
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
1185
|
+
# The cadence to bill for this price on.
|
|
1186
|
+
cadence:,
|
|
1187
|
+
# Configuration for cumulative_grouped_allocation pricing
|
|
1188
|
+
cumulative_grouped_allocation_config:,
|
|
1189
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
1190
|
+
currency:,
|
|
1191
|
+
# The id of the item the price will be associated with.
|
|
1192
|
+
item_id:,
|
|
1193
|
+
# The name of the price.
|
|
1194
|
+
name:,
|
|
1195
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1196
|
+
# usage-based.
|
|
1197
|
+
billable_metric_id: nil,
|
|
1198
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1199
|
+
# this is true, and in-arrears if this is false.
|
|
1200
|
+
billed_in_advance: nil,
|
|
1201
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1202
|
+
# months.
|
|
1203
|
+
billing_cycle_configuration: nil,
|
|
1204
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1205
|
+
conversion_rate: nil,
|
|
1206
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1207
|
+
conversion_rate_config: nil,
|
|
1208
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1209
|
+
dimensional_price_configuration: nil,
|
|
1210
|
+
# An alias for the price.
|
|
1211
|
+
external_price_id: nil,
|
|
1212
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1213
|
+
# applied.
|
|
1214
|
+
fixed_price_quantity: nil,
|
|
1215
|
+
# The property used to group this price on an invoice
|
|
1216
|
+
invoice_grouping_key: nil,
|
|
1217
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1218
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1219
|
+
invoicing_cycle_configuration: nil,
|
|
1220
|
+
# The ID of the license type to associate with this price.
|
|
1221
|
+
license_type_id: nil,
|
|
1222
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1223
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1224
|
+
# by setting `metadata` to `null`.
|
|
1225
|
+
metadata: nil,
|
|
1226
|
+
# The pricing model type
|
|
1227
|
+
model_type: :cumulative_grouped_allocation
|
|
2308
1228
|
)
|
|
2309
1229
|
end
|
|
2310
1230
|
|
|
2311
1231
|
sig do
|
|
2312
|
-
override.returns(
|
|
1232
|
+
override.returns(
|
|
1233
|
+
{
|
|
1234
|
+
cadence:
|
|
1235
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::OrSymbol,
|
|
1236
|
+
cumulative_grouped_allocation_config:
|
|
1237
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig,
|
|
1238
|
+
currency: String,
|
|
1239
|
+
item_id: String,
|
|
1240
|
+
model_type: Symbol,
|
|
1241
|
+
name: String,
|
|
1242
|
+
billable_metric_id: T.nilable(String),
|
|
1243
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1244
|
+
billing_cycle_configuration:
|
|
1245
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1246
|
+
conversion_rate: T.nilable(Float),
|
|
1247
|
+
conversion_rate_config:
|
|
1248
|
+
T.nilable(
|
|
1249
|
+
T.any(
|
|
1250
|
+
Orb::UnitConversionRateConfig,
|
|
1251
|
+
Orb::TieredConversionRateConfig
|
|
1252
|
+
)
|
|
1253
|
+
),
|
|
1254
|
+
dimensional_price_configuration:
|
|
1255
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration),
|
|
1256
|
+
external_price_id: T.nilable(String),
|
|
1257
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1258
|
+
invoice_grouping_key: T.nilable(String),
|
|
1259
|
+
invoicing_cycle_configuration:
|
|
1260
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1261
|
+
license_type_id: T.nilable(String),
|
|
1262
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)])
|
|
1263
|
+
}
|
|
1264
|
+
)
|
|
2313
1265
|
end
|
|
2314
1266
|
def to_hash
|
|
2315
1267
|
end
|
|
2316
|
-
end
|
|
2317
|
-
end
|
|
2318
1268
|
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
1269
|
+
# The cadence to bill for this price on.
|
|
1270
|
+
module Cadence
|
|
1271
|
+
extend Orb::Internal::Type::Enum
|
|
1272
|
+
|
|
1273
|
+
TaggedSymbol =
|
|
1274
|
+
T.type_alias do
|
|
1275
|
+
T.all(
|
|
1276
|
+
Symbol,
|
|
1277
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence
|
|
1278
|
+
)
|
|
1279
|
+
end
|
|
1280
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2327
1281
|
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
1282
|
+
ANNUAL =
|
|
1283
|
+
T.let(
|
|
1284
|
+
:annual,
|
|
1285
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
1286
|
+
)
|
|
1287
|
+
SEMI_ANNUAL =
|
|
1288
|
+
T.let(
|
|
1289
|
+
:semi_annual,
|
|
1290
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
1291
|
+
)
|
|
1292
|
+
MONTHLY =
|
|
1293
|
+
T.let(
|
|
1294
|
+
:monthly,
|
|
1295
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
1296
|
+
)
|
|
1297
|
+
QUARTERLY =
|
|
1298
|
+
T.let(
|
|
1299
|
+
:quarterly,
|
|
1300
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
1301
|
+
)
|
|
1302
|
+
ONE_TIME =
|
|
1303
|
+
T.let(
|
|
1304
|
+
:one_time,
|
|
1305
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
1306
|
+
)
|
|
1307
|
+
CUSTOM =
|
|
1308
|
+
T.let(
|
|
1309
|
+
:custom,
|
|
1310
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
1311
|
+
)
|
|
2331
1312
|
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
1313
|
+
sig do
|
|
1314
|
+
override.returns(
|
|
1315
|
+
T::Array[
|
|
1316
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol
|
|
1317
|
+
]
|
|
1318
|
+
)
|
|
1319
|
+
end
|
|
1320
|
+
def self.values
|
|
1321
|
+
end
|
|
1322
|
+
end
|
|
2341
1323
|
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
1324
|
+
class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel
|
|
1325
|
+
OrHash =
|
|
1326
|
+
T.type_alias do
|
|
1327
|
+
T.any(
|
|
1328
|
+
Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig,
|
|
1329
|
+
Orb::Internal::AnyHash
|
|
1330
|
+
)
|
|
1331
|
+
end
|
|
2345
1332
|
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
1333
|
+
# The overall allocation across all groups
|
|
1334
|
+
sig { returns(String) }
|
|
1335
|
+
attr_accessor :cumulative_allocation
|
|
2349
1336
|
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
1337
|
+
# The allocation per individual group
|
|
1338
|
+
sig { returns(String) }
|
|
1339
|
+
attr_accessor :group_allocation
|
|
2353
1340
|
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
1341
|
+
# The event property used to group usage before applying allocations
|
|
1342
|
+
sig { returns(String) }
|
|
1343
|
+
attr_accessor :grouping_key
|
|
2357
1344
|
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
first_dimension: String,
|
|
2362
|
-
matrix_scaling_factors:
|
|
2363
|
-
T::Array[
|
|
2364
|
-
Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor::OrHash
|
|
2365
|
-
],
|
|
2366
|
-
unit_price: String,
|
|
2367
|
-
grouping_key: T.nilable(String),
|
|
2368
|
-
prorate: T.nilable(T::Boolean),
|
|
2369
|
-
second_dimension: T.nilable(String)
|
|
2370
|
-
).returns(T.attached_class)
|
|
2371
|
-
end
|
|
2372
|
-
def self.new(
|
|
2373
|
-
# Used to determine the unit rate
|
|
2374
|
-
first_dimension:,
|
|
2375
|
-
# Apply a scaling factor to each dimension
|
|
2376
|
-
matrix_scaling_factors:,
|
|
2377
|
-
# The final unit price to rate against the output of the matrix
|
|
2378
|
-
unit_price:,
|
|
2379
|
-
# The property used to group this price
|
|
2380
|
-
grouping_key: nil,
|
|
2381
|
-
# If true, the unit price will be prorated to the billing period
|
|
2382
|
-
prorate: nil,
|
|
2383
|
-
# Used to determine the unit rate (optional)
|
|
2384
|
-
second_dimension: nil
|
|
2385
|
-
)
|
|
2386
|
-
end
|
|
1345
|
+
# The amount to charge for each unit outside of the allocation
|
|
1346
|
+
sig { returns(String) }
|
|
1347
|
+
attr_accessor :unit_amount
|
|
2387
1348
|
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
1349
|
+
# Configuration for cumulative_grouped_allocation pricing
|
|
1350
|
+
sig do
|
|
1351
|
+
params(
|
|
1352
|
+
cumulative_allocation: String,
|
|
1353
|
+
group_allocation: String,
|
|
1354
|
+
grouping_key: String,
|
|
1355
|
+
unit_amount: String
|
|
1356
|
+
).returns(T.attached_class)
|
|
1357
|
+
end
|
|
1358
|
+
def self.new(
|
|
1359
|
+
# The overall allocation across all groups
|
|
1360
|
+
cumulative_allocation:,
|
|
1361
|
+
# The allocation per individual group
|
|
1362
|
+
group_allocation:,
|
|
1363
|
+
# The event property used to group usage before applying allocations
|
|
1364
|
+
grouping_key:,
|
|
1365
|
+
# The amount to charge for each unit outside of the allocation
|
|
1366
|
+
unit_amount:
|
|
1367
|
+
)
|
|
1368
|
+
end
|
|
1369
|
+
|
|
1370
|
+
sig do
|
|
1371
|
+
override.returns(
|
|
1372
|
+
{
|
|
1373
|
+
cumulative_allocation: String,
|
|
1374
|
+
group_allocation: String,
|
|
1375
|
+
grouping_key: String,
|
|
1376
|
+
unit_amount: String
|
|
1377
|
+
}
|
|
1378
|
+
)
|
|
1379
|
+
end
|
|
1380
|
+
def to_hash
|
|
1381
|
+
end
|
|
1382
|
+
end
|
|
2404
1383
|
end
|
|
2405
1384
|
|
|
2406
|
-
class
|
|
1385
|
+
class Percent < Orb::Internal::Type::BaseModel
|
|
2407
1386
|
OrHash =
|
|
2408
1387
|
T.type_alias do
|
|
2409
1388
|
T.any(
|
|
2410
|
-
Orb::PriceCreateParams::
|
|
1389
|
+
Orb::PriceCreateParams::Body::Percent,
|
|
2411
1390
|
Orb::Internal::AnyHash
|
|
2412
1391
|
)
|
|
2413
1392
|
end
|
|
2414
1393
|
|
|
1394
|
+
# The cadence to bill for this price on.
|
|
1395
|
+
sig do
|
|
1396
|
+
returns(Orb::PriceCreateParams::Body::Percent::Cadence::OrSymbol)
|
|
1397
|
+
end
|
|
1398
|
+
attr_accessor :cadence
|
|
1399
|
+
|
|
1400
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
2415
1401
|
sig { returns(String) }
|
|
2416
|
-
attr_accessor :
|
|
1402
|
+
attr_accessor :currency
|
|
2417
1403
|
|
|
1404
|
+
# The id of the item the price will be associated with.
|
|
2418
1405
|
sig { returns(String) }
|
|
2419
|
-
attr_accessor :
|
|
1406
|
+
attr_accessor :item_id
|
|
2420
1407
|
|
|
2421
|
-
|
|
2422
|
-
|
|
1408
|
+
# The pricing model type
|
|
1409
|
+
sig { returns(Symbol) }
|
|
1410
|
+
attr_accessor :model_type
|
|
1411
|
+
|
|
1412
|
+
# The name of the price.
|
|
1413
|
+
sig { returns(String) }
|
|
1414
|
+
attr_accessor :name
|
|
1415
|
+
|
|
1416
|
+
# Configuration for percent pricing
|
|
1417
|
+
sig { returns(Orb::PriceCreateParams::Body::Percent::PercentConfig) }
|
|
1418
|
+
attr_reader :percent_config
|
|
2423
1419
|
|
|
2424
|
-
# Configuration for a single matrix scaling factor
|
|
2425
1420
|
sig do
|
|
2426
1421
|
params(
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
).returns(T.attached_class)
|
|
2431
|
-
end
|
|
2432
|
-
def self.new(
|
|
2433
|
-
first_dimension_value:,
|
|
2434
|
-
scaling_factor:,
|
|
2435
|
-
second_dimension_value: nil
|
|
2436
|
-
)
|
|
1422
|
+
percent_config:
|
|
1423
|
+
Orb::PriceCreateParams::Body::Percent::PercentConfig::OrHash
|
|
1424
|
+
).void
|
|
2437
1425
|
end
|
|
1426
|
+
attr_writer :percent_config
|
|
1427
|
+
|
|
1428
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1429
|
+
# usage-based.
|
|
1430
|
+
sig { returns(T.nilable(String)) }
|
|
1431
|
+
attr_accessor :billable_metric_id
|
|
1432
|
+
|
|
1433
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1434
|
+
# this is true, and in-arrears if this is false.
|
|
1435
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
1436
|
+
attr_accessor :billed_in_advance
|
|
1437
|
+
|
|
1438
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1439
|
+
# months.
|
|
1440
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1441
|
+
attr_reader :billing_cycle_configuration
|
|
2438
1442
|
|
|
2439
1443
|
sig do
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
second_dimension_value: T.nilable(String)
|
|
2445
|
-
}
|
|
2446
|
-
)
|
|
2447
|
-
end
|
|
2448
|
-
def to_hash
|
|
1444
|
+
params(
|
|
1445
|
+
billing_cycle_configuration:
|
|
1446
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1447
|
+
).void
|
|
2449
1448
|
end
|
|
2450
|
-
|
|
2451
|
-
end
|
|
1449
|
+
attr_writer :billing_cycle_configuration
|
|
2452
1450
|
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
1451
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1452
|
+
sig { returns(T.nilable(Float)) }
|
|
1453
|
+
attr_accessor :conversion_rate
|
|
1454
|
+
|
|
1455
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1456
|
+
sig do
|
|
1457
|
+
returns(
|
|
1458
|
+
T.nilable(
|
|
1459
|
+
T.any(
|
|
1460
|
+
Orb::UnitConversionRateConfig,
|
|
1461
|
+
Orb::TieredConversionRateConfig
|
|
1462
|
+
)
|
|
1463
|
+
)
|
|
2459
1464
|
)
|
|
2460
1465
|
end
|
|
1466
|
+
attr_accessor :conversion_rate_config
|
|
2461
1467
|
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
# Apply a scaling factor to each dimension
|
|
2467
|
-
sig do
|
|
2468
|
-
returns(
|
|
2469
|
-
T::Array[
|
|
2470
|
-
Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor
|
|
2471
|
-
]
|
|
2472
|
-
)
|
|
2473
|
-
end
|
|
2474
|
-
attr_accessor :matrix_scaling_factors
|
|
2475
|
-
|
|
2476
|
-
sig do
|
|
2477
|
-
returns(
|
|
2478
|
-
T::Array[
|
|
2479
|
-
Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::Tier
|
|
2480
|
-
]
|
|
2481
|
-
)
|
|
2482
|
-
end
|
|
2483
|
-
attr_accessor :tiers
|
|
1468
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1469
|
+
sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
|
|
1470
|
+
attr_reader :dimensional_price_configuration
|
|
2484
1471
|
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
1472
|
+
sig do
|
|
1473
|
+
params(
|
|
1474
|
+
dimensional_price_configuration:
|
|
1475
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
|
|
1476
|
+
).void
|
|
1477
|
+
end
|
|
1478
|
+
attr_writer :dimensional_price_configuration
|
|
2488
1479
|
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
first_dimension: String,
|
|
2493
|
-
matrix_scaling_factors:
|
|
2494
|
-
T::Array[
|
|
2495
|
-
Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor::OrHash
|
|
2496
|
-
],
|
|
2497
|
-
tiers:
|
|
2498
|
-
T::Array[
|
|
2499
|
-
Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::Tier::OrHash
|
|
2500
|
-
],
|
|
2501
|
-
second_dimension: T.nilable(String)
|
|
2502
|
-
).returns(T.attached_class)
|
|
2503
|
-
end
|
|
2504
|
-
def self.new(
|
|
2505
|
-
# Used for the scalable matrix first dimension
|
|
2506
|
-
first_dimension:,
|
|
2507
|
-
# Apply a scaling factor to each dimension
|
|
2508
|
-
matrix_scaling_factors:,
|
|
2509
|
-
tiers:,
|
|
2510
|
-
# Used for the scalable matrix second dimension (optional)
|
|
2511
|
-
second_dimension: nil
|
|
2512
|
-
)
|
|
2513
|
-
end
|
|
1480
|
+
# An alias for the price.
|
|
1481
|
+
sig { returns(T.nilable(String)) }
|
|
1482
|
+
attr_accessor :external_price_id
|
|
2514
1483
|
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
matrix_scaling_factors:
|
|
2520
|
-
T::Array[
|
|
2521
|
-
Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor
|
|
2522
|
-
],
|
|
2523
|
-
tiers:
|
|
2524
|
-
T::Array[
|
|
2525
|
-
Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::Tier
|
|
2526
|
-
],
|
|
2527
|
-
second_dimension: T.nilable(String)
|
|
2528
|
-
}
|
|
2529
|
-
)
|
|
2530
|
-
end
|
|
2531
|
-
def to_hash
|
|
2532
|
-
end
|
|
1484
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1485
|
+
# applied.
|
|
1486
|
+
sig { returns(T.nilable(Float)) }
|
|
1487
|
+
attr_accessor :fixed_price_quantity
|
|
2533
1488
|
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
T.any(
|
|
2538
|
-
Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor,
|
|
2539
|
-
Orb::Internal::AnyHash
|
|
2540
|
-
)
|
|
2541
|
-
end
|
|
1489
|
+
# The property used to group this price on an invoice
|
|
1490
|
+
sig { returns(T.nilable(String)) }
|
|
1491
|
+
attr_accessor :invoice_grouping_key
|
|
2542
1492
|
|
|
2543
|
-
|
|
2544
|
-
|
|
1493
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1494
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1495
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1496
|
+
attr_reader :invoicing_cycle_configuration
|
|
2545
1497
|
|
|
2546
|
-
sig
|
|
2547
|
-
|
|
1498
|
+
sig do
|
|
1499
|
+
params(
|
|
1500
|
+
invoicing_cycle_configuration:
|
|
1501
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1502
|
+
).void
|
|
1503
|
+
end
|
|
1504
|
+
attr_writer :invoicing_cycle_configuration
|
|
2548
1505
|
|
|
1506
|
+
# The ID of the license type to associate with this price.
|
|
2549
1507
|
sig { returns(T.nilable(String)) }
|
|
2550
|
-
attr_accessor :
|
|
1508
|
+
attr_accessor :license_type_id
|
|
1509
|
+
|
|
1510
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1511
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1512
|
+
# by setting `metadata` to `null`.
|
|
1513
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
1514
|
+
attr_accessor :metadata
|
|
2551
1515
|
|
|
2552
|
-
# Configuration for a single matrix scaling factor
|
|
2553
1516
|
sig do
|
|
2554
1517
|
params(
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
1518
|
+
cadence: Orb::PriceCreateParams::Body::Percent::Cadence::OrSymbol,
|
|
1519
|
+
currency: String,
|
|
1520
|
+
item_id: String,
|
|
1521
|
+
name: String,
|
|
1522
|
+
percent_config:
|
|
1523
|
+
Orb::PriceCreateParams::Body::Percent::PercentConfig::OrHash,
|
|
1524
|
+
billable_metric_id: T.nilable(String),
|
|
1525
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1526
|
+
billing_cycle_configuration:
|
|
1527
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1528
|
+
conversion_rate: T.nilable(Float),
|
|
1529
|
+
conversion_rate_config:
|
|
1530
|
+
T.nilable(
|
|
1531
|
+
T.any(
|
|
1532
|
+
Orb::UnitConversionRateConfig::OrHash,
|
|
1533
|
+
Orb::TieredConversionRateConfig::OrHash
|
|
1534
|
+
)
|
|
1535
|
+
),
|
|
1536
|
+
dimensional_price_configuration:
|
|
1537
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
|
|
1538
|
+
external_price_id: T.nilable(String),
|
|
1539
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1540
|
+
invoice_grouping_key: T.nilable(String),
|
|
1541
|
+
invoicing_cycle_configuration:
|
|
1542
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1543
|
+
license_type_id: T.nilable(String),
|
|
1544
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
1545
|
+
model_type: Symbol
|
|
2558
1546
|
).returns(T.attached_class)
|
|
2559
1547
|
end
|
|
2560
1548
|
def self.new(
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
1549
|
+
# The cadence to bill for this price on.
|
|
1550
|
+
cadence:,
|
|
1551
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
1552
|
+
currency:,
|
|
1553
|
+
# The id of the item the price will be associated with.
|
|
1554
|
+
item_id:,
|
|
1555
|
+
# The name of the price.
|
|
1556
|
+
name:,
|
|
1557
|
+
# Configuration for percent pricing
|
|
1558
|
+
percent_config:,
|
|
1559
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1560
|
+
# usage-based.
|
|
1561
|
+
billable_metric_id: nil,
|
|
1562
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1563
|
+
# this is true, and in-arrears if this is false.
|
|
1564
|
+
billed_in_advance: nil,
|
|
1565
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1566
|
+
# months.
|
|
1567
|
+
billing_cycle_configuration: nil,
|
|
1568
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1569
|
+
conversion_rate: nil,
|
|
1570
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1571
|
+
conversion_rate_config: nil,
|
|
1572
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1573
|
+
dimensional_price_configuration: nil,
|
|
1574
|
+
# An alias for the price.
|
|
1575
|
+
external_price_id: nil,
|
|
1576
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1577
|
+
# applied.
|
|
1578
|
+
fixed_price_quantity: nil,
|
|
1579
|
+
# The property used to group this price on an invoice
|
|
1580
|
+
invoice_grouping_key: nil,
|
|
1581
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1582
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1583
|
+
invoicing_cycle_configuration: nil,
|
|
1584
|
+
# The ID of the license type to associate with this price.
|
|
1585
|
+
license_type_id: nil,
|
|
1586
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1587
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1588
|
+
# by setting `metadata` to `null`.
|
|
1589
|
+
metadata: nil,
|
|
1590
|
+
# The pricing model type
|
|
1591
|
+
model_type: :percent
|
|
2564
1592
|
)
|
|
2565
1593
|
end
|
|
2566
1594
|
|
|
2567
1595
|
sig do
|
|
2568
1596
|
override.returns(
|
|
2569
1597
|
{
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
1598
|
+
cadence:
|
|
1599
|
+
Orb::PriceCreateParams::Body::Percent::Cadence::OrSymbol,
|
|
1600
|
+
currency: String,
|
|
1601
|
+
item_id: String,
|
|
1602
|
+
model_type: Symbol,
|
|
1603
|
+
name: String,
|
|
1604
|
+
percent_config:
|
|
1605
|
+
Orb::PriceCreateParams::Body::Percent::PercentConfig,
|
|
1606
|
+
billable_metric_id: T.nilable(String),
|
|
1607
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1608
|
+
billing_cycle_configuration:
|
|
1609
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1610
|
+
conversion_rate: T.nilable(Float),
|
|
1611
|
+
conversion_rate_config:
|
|
1612
|
+
T.nilable(
|
|
1613
|
+
T.any(
|
|
1614
|
+
Orb::UnitConversionRateConfig,
|
|
1615
|
+
Orb::TieredConversionRateConfig
|
|
1616
|
+
)
|
|
1617
|
+
),
|
|
1618
|
+
dimensional_price_configuration:
|
|
1619
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration),
|
|
1620
|
+
external_price_id: T.nilable(String),
|
|
1621
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1622
|
+
invoice_grouping_key: T.nilable(String),
|
|
1623
|
+
invoicing_cycle_configuration:
|
|
1624
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1625
|
+
license_type_id: T.nilable(String),
|
|
1626
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)])
|
|
2573
1627
|
}
|
|
2574
1628
|
)
|
|
2575
1629
|
end
|
|
2576
1630
|
def to_hash
|
|
2577
1631
|
end
|
|
1632
|
+
|
|
1633
|
+
# The cadence to bill for this price on.
|
|
1634
|
+
module Cadence
|
|
1635
|
+
extend Orb::Internal::Type::Enum
|
|
1636
|
+
|
|
1637
|
+
TaggedSymbol =
|
|
1638
|
+
T.type_alias do
|
|
1639
|
+
T.all(Symbol, Orb::PriceCreateParams::Body::Percent::Cadence)
|
|
1640
|
+
end
|
|
1641
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1642
|
+
|
|
1643
|
+
ANNUAL =
|
|
1644
|
+
T.let(
|
|
1645
|
+
:annual,
|
|
1646
|
+
Orb::PriceCreateParams::Body::Percent::Cadence::TaggedSymbol
|
|
1647
|
+
)
|
|
1648
|
+
SEMI_ANNUAL =
|
|
1649
|
+
T.let(
|
|
1650
|
+
:semi_annual,
|
|
1651
|
+
Orb::PriceCreateParams::Body::Percent::Cadence::TaggedSymbol
|
|
1652
|
+
)
|
|
1653
|
+
MONTHLY =
|
|
1654
|
+
T.let(
|
|
1655
|
+
:monthly,
|
|
1656
|
+
Orb::PriceCreateParams::Body::Percent::Cadence::TaggedSymbol
|
|
1657
|
+
)
|
|
1658
|
+
QUARTERLY =
|
|
1659
|
+
T.let(
|
|
1660
|
+
:quarterly,
|
|
1661
|
+
Orb::PriceCreateParams::Body::Percent::Cadence::TaggedSymbol
|
|
1662
|
+
)
|
|
1663
|
+
ONE_TIME =
|
|
1664
|
+
T.let(
|
|
1665
|
+
:one_time,
|
|
1666
|
+
Orb::PriceCreateParams::Body::Percent::Cadence::TaggedSymbol
|
|
1667
|
+
)
|
|
1668
|
+
CUSTOM =
|
|
1669
|
+
T.let(
|
|
1670
|
+
:custom,
|
|
1671
|
+
Orb::PriceCreateParams::Body::Percent::Cadence::TaggedSymbol
|
|
1672
|
+
)
|
|
1673
|
+
|
|
1674
|
+
sig do
|
|
1675
|
+
override.returns(
|
|
1676
|
+
T::Array[
|
|
1677
|
+
Orb::PriceCreateParams::Body::Percent::Cadence::TaggedSymbol
|
|
1678
|
+
]
|
|
1679
|
+
)
|
|
1680
|
+
end
|
|
1681
|
+
def self.values
|
|
1682
|
+
end
|
|
1683
|
+
end
|
|
1684
|
+
|
|
1685
|
+
class PercentConfig < Orb::Internal::Type::BaseModel
|
|
1686
|
+
OrHash =
|
|
1687
|
+
T.type_alias do
|
|
1688
|
+
T.any(
|
|
1689
|
+
Orb::PriceCreateParams::Body::Percent::PercentConfig,
|
|
1690
|
+
Orb::Internal::AnyHash
|
|
1691
|
+
)
|
|
1692
|
+
end
|
|
1693
|
+
|
|
1694
|
+
# What percent of the component subtotals to charge
|
|
1695
|
+
sig { returns(Float) }
|
|
1696
|
+
attr_accessor :percent
|
|
1697
|
+
|
|
1698
|
+
# Configuration for percent pricing
|
|
1699
|
+
sig { params(percent: Float).returns(T.attached_class) }
|
|
1700
|
+
def self.new(
|
|
1701
|
+
# What percent of the component subtotals to charge
|
|
1702
|
+
percent:
|
|
1703
|
+
)
|
|
1704
|
+
end
|
|
1705
|
+
|
|
1706
|
+
sig { override.returns({ percent: Float }) }
|
|
1707
|
+
def to_hash
|
|
1708
|
+
end
|
|
1709
|
+
end
|
|
2578
1710
|
end
|
|
2579
1711
|
|
|
2580
|
-
class
|
|
1712
|
+
class EventOutput < Orb::Internal::Type::BaseModel
|
|
2581
1713
|
OrHash =
|
|
2582
1714
|
T.type_alias do
|
|
2583
1715
|
T.any(
|
|
2584
|
-
Orb::PriceCreateParams::
|
|
1716
|
+
Orb::PriceCreateParams::Body::EventOutput,
|
|
2585
1717
|
Orb::Internal::AnyHash
|
|
2586
1718
|
)
|
|
2587
1719
|
end
|
|
2588
1720
|
|
|
2589
|
-
|
|
2590
|
-
|
|
1721
|
+
# The cadence to bill for this price on.
|
|
1722
|
+
sig do
|
|
1723
|
+
returns(
|
|
1724
|
+
Orb::PriceCreateParams::Body::EventOutput::Cadence::OrSymbol
|
|
1725
|
+
)
|
|
1726
|
+
end
|
|
1727
|
+
attr_accessor :cadence
|
|
2591
1728
|
|
|
1729
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
2592
1730
|
sig { returns(String) }
|
|
2593
|
-
attr_accessor :
|
|
1731
|
+
attr_accessor :currency
|
|
2594
1732
|
|
|
2595
|
-
# Configuration for
|
|
1733
|
+
# Configuration for event_output pricing
|
|
2596
1734
|
sig do
|
|
2597
|
-
|
|
2598
|
-
|
|
1735
|
+
returns(
|
|
1736
|
+
Orb::PriceCreateParams::Body::EventOutput::EventOutputConfig
|
|
2599
1737
|
)
|
|
2600
1738
|
end
|
|
2601
|
-
|
|
2602
|
-
end
|
|
1739
|
+
attr_reader :event_output_config
|
|
2603
1740
|
|
|
2604
1741
|
sig do
|
|
2605
|
-
|
|
1742
|
+
params(
|
|
1743
|
+
event_output_config:
|
|
1744
|
+
Orb::PriceCreateParams::Body::EventOutput::EventOutputConfig::OrHash
|
|
1745
|
+
).void
|
|
2606
1746
|
end
|
|
2607
|
-
|
|
1747
|
+
attr_writer :event_output_config
|
|
1748
|
+
|
|
1749
|
+
# The id of the item the price will be associated with.
|
|
1750
|
+
sig { returns(String) }
|
|
1751
|
+
attr_accessor :item_id
|
|
1752
|
+
|
|
1753
|
+
# The pricing model type
|
|
1754
|
+
sig { returns(Symbol) }
|
|
1755
|
+
attr_accessor :model_type
|
|
1756
|
+
|
|
1757
|
+
# The name of the price.
|
|
1758
|
+
sig { returns(String) }
|
|
1759
|
+
attr_accessor :name
|
|
1760
|
+
|
|
1761
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1762
|
+
# usage-based.
|
|
1763
|
+
sig { returns(T.nilable(String)) }
|
|
1764
|
+
attr_accessor :billable_metric_id
|
|
1765
|
+
|
|
1766
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1767
|
+
# this is true, and in-arrears if this is false.
|
|
1768
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
1769
|
+
attr_accessor :billed_in_advance
|
|
1770
|
+
|
|
1771
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1772
|
+
# months.
|
|
1773
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1774
|
+
attr_reader :billing_cycle_configuration
|
|
1775
|
+
|
|
1776
|
+
sig do
|
|
1777
|
+
params(
|
|
1778
|
+
billing_cycle_configuration:
|
|
1779
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1780
|
+
).void
|
|
2608
1781
|
end
|
|
2609
|
-
|
|
2610
|
-
end
|
|
1782
|
+
attr_writer :billing_cycle_configuration
|
|
2611
1783
|
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
1784
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1785
|
+
sig { returns(T.nilable(Float)) }
|
|
1786
|
+
attr_accessor :conversion_rate
|
|
1787
|
+
|
|
1788
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1789
|
+
sig do
|
|
1790
|
+
returns(
|
|
1791
|
+
T.nilable(
|
|
1792
|
+
T.any(
|
|
1793
|
+
Orb::UnitConversionRateConfig,
|
|
1794
|
+
Orb::TieredConversionRateConfig
|
|
1795
|
+
)
|
|
1796
|
+
)
|
|
2618
1797
|
)
|
|
2619
1798
|
end
|
|
1799
|
+
attr_accessor :conversion_rate_config
|
|
2620
1800
|
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
T::Array[
|
|
2625
|
-
Orb::PriceCreateParams::CumulativeGroupedBulkConfig::DimensionValue
|
|
2626
|
-
]
|
|
2627
|
-
)
|
|
2628
|
-
end
|
|
2629
|
-
attr_accessor :dimension_values
|
|
1801
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1802
|
+
sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
|
|
1803
|
+
attr_reader :dimensional_price_configuration
|
|
2630
1804
|
|
|
2631
|
-
|
|
2632
|
-
|
|
1805
|
+
sig do
|
|
1806
|
+
params(
|
|
1807
|
+
dimensional_price_configuration:
|
|
1808
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
|
|
1809
|
+
).void
|
|
1810
|
+
end
|
|
1811
|
+
attr_writer :dimensional_price_configuration
|
|
2633
1812
|
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
dimension_values:
|
|
2638
|
-
T::Array[
|
|
2639
|
-
Orb::PriceCreateParams::CumulativeGroupedBulkConfig::DimensionValue::OrHash
|
|
2640
|
-
],
|
|
2641
|
-
group: String
|
|
2642
|
-
).returns(T.attached_class)
|
|
2643
|
-
end
|
|
2644
|
-
def self.new(
|
|
2645
|
-
# Each tier lower bound must have the same group of values.
|
|
2646
|
-
dimension_values:,
|
|
2647
|
-
group:
|
|
2648
|
-
)
|
|
2649
|
-
end
|
|
1813
|
+
# An alias for the price.
|
|
1814
|
+
sig { returns(T.nilable(String)) }
|
|
1815
|
+
attr_accessor :external_price_id
|
|
2650
1816
|
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
T::Array[
|
|
2656
|
-
Orb::PriceCreateParams::CumulativeGroupedBulkConfig::DimensionValue
|
|
2657
|
-
],
|
|
2658
|
-
group: String
|
|
2659
|
-
}
|
|
2660
|
-
)
|
|
2661
|
-
end
|
|
2662
|
-
def to_hash
|
|
2663
|
-
end
|
|
1817
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1818
|
+
# applied.
|
|
1819
|
+
sig { returns(T.nilable(Float)) }
|
|
1820
|
+
attr_accessor :fixed_price_quantity
|
|
2664
1821
|
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
T.any(
|
|
2669
|
-
Orb::PriceCreateParams::CumulativeGroupedBulkConfig::DimensionValue,
|
|
2670
|
-
Orb::Internal::AnyHash
|
|
2671
|
-
)
|
|
2672
|
-
end
|
|
1822
|
+
# The property used to group this price on an invoice
|
|
1823
|
+
sig { returns(T.nilable(String)) }
|
|
1824
|
+
attr_accessor :invoice_grouping_key
|
|
2673
1825
|
|
|
2674
|
-
#
|
|
2675
|
-
|
|
2676
|
-
|
|
1826
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1827
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1828
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1829
|
+
attr_reader :invoicing_cycle_configuration
|
|
2677
1830
|
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
1831
|
+
sig do
|
|
1832
|
+
params(
|
|
1833
|
+
invoicing_cycle_configuration:
|
|
1834
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1835
|
+
).void
|
|
1836
|
+
end
|
|
1837
|
+
attr_writer :invoicing_cycle_configuration
|
|
2681
1838
|
|
|
2682
|
-
#
|
|
2683
|
-
sig { returns(String) }
|
|
2684
|
-
attr_accessor :
|
|
1839
|
+
# The ID of the license type to associate with this price.
|
|
1840
|
+
sig { returns(T.nilable(String)) }
|
|
1841
|
+
attr_accessor :license_type_id
|
|
1842
|
+
|
|
1843
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1844
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1845
|
+
# by setting `metadata` to `null`.
|
|
1846
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
1847
|
+
attr_accessor :metadata
|
|
2685
1848
|
|
|
2686
|
-
# Configuration for a dimension value entry
|
|
2687
1849
|
sig do
|
|
2688
1850
|
params(
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
1851
|
+
cadence:
|
|
1852
|
+
Orb::PriceCreateParams::Body::EventOutput::Cadence::OrSymbol,
|
|
1853
|
+
currency: String,
|
|
1854
|
+
event_output_config:
|
|
1855
|
+
Orb::PriceCreateParams::Body::EventOutput::EventOutputConfig::OrHash,
|
|
1856
|
+
item_id: String,
|
|
1857
|
+
name: String,
|
|
1858
|
+
billable_metric_id: T.nilable(String),
|
|
1859
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1860
|
+
billing_cycle_configuration:
|
|
1861
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1862
|
+
conversion_rate: T.nilable(Float),
|
|
1863
|
+
conversion_rate_config:
|
|
1864
|
+
T.nilable(
|
|
1865
|
+
T.any(
|
|
1866
|
+
Orb::UnitConversionRateConfig::OrHash,
|
|
1867
|
+
Orb::TieredConversionRateConfig::OrHash
|
|
1868
|
+
)
|
|
1869
|
+
),
|
|
1870
|
+
dimensional_price_configuration:
|
|
1871
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
|
|
1872
|
+
external_price_id: T.nilable(String),
|
|
1873
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1874
|
+
invoice_grouping_key: T.nilable(String),
|
|
1875
|
+
invoicing_cycle_configuration:
|
|
1876
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1877
|
+
license_type_id: T.nilable(String),
|
|
1878
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
1879
|
+
model_type: Symbol
|
|
2692
1880
|
).returns(T.attached_class)
|
|
2693
1881
|
end
|
|
2694
1882
|
def self.new(
|
|
2695
|
-
#
|
|
2696
|
-
|
|
2697
|
-
#
|
|
2698
|
-
|
|
2699
|
-
#
|
|
2700
|
-
|
|
1883
|
+
# The cadence to bill for this price on.
|
|
1884
|
+
cadence:,
|
|
1885
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
1886
|
+
currency:,
|
|
1887
|
+
# Configuration for event_output pricing
|
|
1888
|
+
event_output_config:,
|
|
1889
|
+
# The id of the item the price will be associated with.
|
|
1890
|
+
item_id:,
|
|
1891
|
+
# The name of the price.
|
|
1892
|
+
name:,
|
|
1893
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1894
|
+
# usage-based.
|
|
1895
|
+
billable_metric_id: nil,
|
|
1896
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1897
|
+
# this is true, and in-arrears if this is false.
|
|
1898
|
+
billed_in_advance: nil,
|
|
1899
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1900
|
+
# months.
|
|
1901
|
+
billing_cycle_configuration: nil,
|
|
1902
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1903
|
+
conversion_rate: nil,
|
|
1904
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1905
|
+
conversion_rate_config: nil,
|
|
1906
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1907
|
+
dimensional_price_configuration: nil,
|
|
1908
|
+
# An alias for the price.
|
|
1909
|
+
external_price_id: nil,
|
|
1910
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1911
|
+
# applied.
|
|
1912
|
+
fixed_price_quantity: nil,
|
|
1913
|
+
# The property used to group this price on an invoice
|
|
1914
|
+
invoice_grouping_key: nil,
|
|
1915
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1916
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1917
|
+
invoicing_cycle_configuration: nil,
|
|
1918
|
+
# The ID of the license type to associate with this price.
|
|
1919
|
+
license_type_id: nil,
|
|
1920
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1921
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1922
|
+
# by setting `metadata` to `null`.
|
|
1923
|
+
metadata: nil,
|
|
1924
|
+
# The pricing model type
|
|
1925
|
+
model_type: :event_output
|
|
2701
1926
|
)
|
|
2702
1927
|
end
|
|
2703
1928
|
|
|
2704
1929
|
sig do
|
|
2705
1930
|
override.returns(
|
|
2706
1931
|
{
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
1932
|
+
cadence:
|
|
1933
|
+
Orb::PriceCreateParams::Body::EventOutput::Cadence::OrSymbol,
|
|
1934
|
+
currency: String,
|
|
1935
|
+
event_output_config:
|
|
1936
|
+
Orb::PriceCreateParams::Body::EventOutput::EventOutputConfig,
|
|
1937
|
+
item_id: String,
|
|
1938
|
+
model_type: Symbol,
|
|
1939
|
+
name: String,
|
|
1940
|
+
billable_metric_id: T.nilable(String),
|
|
1941
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1942
|
+
billing_cycle_configuration:
|
|
1943
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1944
|
+
conversion_rate: T.nilable(Float),
|
|
1945
|
+
conversion_rate_config:
|
|
1946
|
+
T.nilable(
|
|
1947
|
+
T.any(
|
|
1948
|
+
Orb::UnitConversionRateConfig,
|
|
1949
|
+
Orb::TieredConversionRateConfig
|
|
1950
|
+
)
|
|
1951
|
+
),
|
|
1952
|
+
dimensional_price_configuration:
|
|
1953
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration),
|
|
1954
|
+
external_price_id: T.nilable(String),
|
|
1955
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1956
|
+
invoice_grouping_key: T.nilable(String),
|
|
1957
|
+
invoicing_cycle_configuration:
|
|
1958
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1959
|
+
license_type_id: T.nilable(String),
|
|
1960
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)])
|
|
2710
1961
|
}
|
|
2711
1962
|
)
|
|
2712
1963
|
end
|
|
2713
1964
|
def to_hash
|
|
2714
1965
|
end
|
|
2715
|
-
end
|
|
2716
|
-
end
|
|
2717
|
-
|
|
2718
|
-
class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel
|
|
2719
|
-
OrHash =
|
|
2720
|
-
T.type_alias do
|
|
2721
|
-
T.any(
|
|
2722
|
-
Orb::PriceCreateParams::CumulativeGroupedAllocationConfig,
|
|
2723
|
-
Orb::Internal::AnyHash
|
|
2724
|
-
)
|
|
2725
|
-
end
|
|
2726
|
-
|
|
2727
|
-
# The overall allocation across all groups
|
|
2728
|
-
sig { returns(String) }
|
|
2729
|
-
attr_accessor :cumulative_allocation
|
|
2730
|
-
|
|
2731
|
-
# The allocation per individual group
|
|
2732
|
-
sig { returns(String) }
|
|
2733
|
-
attr_accessor :group_allocation
|
|
2734
|
-
|
|
2735
|
-
# The event property used to group usage before applying allocations
|
|
2736
|
-
sig { returns(String) }
|
|
2737
|
-
attr_accessor :grouping_key
|
|
2738
|
-
|
|
2739
|
-
# The amount to charge for each unit outside of the allocation
|
|
2740
|
-
sig { returns(String) }
|
|
2741
|
-
attr_accessor :unit_amount
|
|
2742
|
-
|
|
2743
|
-
# Configuration for cumulative_grouped_allocation pricing
|
|
2744
|
-
sig do
|
|
2745
|
-
params(
|
|
2746
|
-
cumulative_allocation: String,
|
|
2747
|
-
group_allocation: String,
|
|
2748
|
-
grouping_key: String,
|
|
2749
|
-
unit_amount: String
|
|
2750
|
-
).returns(T.attached_class)
|
|
2751
|
-
end
|
|
2752
|
-
def self.new(
|
|
2753
|
-
# The overall allocation across all groups
|
|
2754
|
-
cumulative_allocation:,
|
|
2755
|
-
# The allocation per individual group
|
|
2756
|
-
group_allocation:,
|
|
2757
|
-
# The event property used to group usage before applying allocations
|
|
2758
|
-
grouping_key:,
|
|
2759
|
-
# The amount to charge for each unit outside of the allocation
|
|
2760
|
-
unit_amount:
|
|
2761
|
-
)
|
|
2762
|
-
end
|
|
2763
|
-
|
|
2764
|
-
sig do
|
|
2765
|
-
override.returns(
|
|
2766
|
-
{
|
|
2767
|
-
cumulative_allocation: String,
|
|
2768
|
-
group_allocation: String,
|
|
2769
|
-
grouping_key: String,
|
|
2770
|
-
unit_amount: String
|
|
2771
|
-
}
|
|
2772
|
-
)
|
|
2773
|
-
end
|
|
2774
|
-
def to_hash
|
|
2775
|
-
end
|
|
2776
|
-
end
|
|
2777
|
-
|
|
2778
|
-
class MinimumCompositeConfig < Orb::Internal::Type::BaseModel
|
|
2779
|
-
OrHash =
|
|
2780
|
-
T.type_alias do
|
|
2781
|
-
T.any(
|
|
2782
|
-
Orb::PriceCreateParams::MinimumCompositeConfig,
|
|
2783
|
-
Orb::Internal::AnyHash
|
|
2784
|
-
)
|
|
2785
|
-
end
|
|
2786
|
-
|
|
2787
|
-
# The minimum amount to apply
|
|
2788
|
-
sig { returns(String) }
|
|
2789
|
-
attr_accessor :minimum_amount
|
|
2790
1966
|
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
1967
|
+
# The cadence to bill for this price on.
|
|
1968
|
+
module Cadence
|
|
1969
|
+
extend Orb::Internal::Type::Enum
|
|
2794
1970
|
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
end
|
|
2804
|
-
def self.new(
|
|
2805
|
-
# The minimum amount to apply
|
|
2806
|
-
minimum_amount:,
|
|
2807
|
-
# If true, subtotals from this price are prorated based on the service period
|
|
2808
|
-
prorated: nil
|
|
2809
|
-
)
|
|
2810
|
-
end
|
|
1971
|
+
TaggedSymbol =
|
|
1972
|
+
T.type_alias do
|
|
1973
|
+
T.all(
|
|
1974
|
+
Symbol,
|
|
1975
|
+
Orb::PriceCreateParams::Body::EventOutput::Cadence
|
|
1976
|
+
)
|
|
1977
|
+
end
|
|
1978
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2811
1979
|
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
1980
|
+
ANNUAL =
|
|
1981
|
+
T.let(
|
|
1982
|
+
:annual,
|
|
1983
|
+
Orb::PriceCreateParams::Body::EventOutput::Cadence::TaggedSymbol
|
|
1984
|
+
)
|
|
1985
|
+
SEMI_ANNUAL =
|
|
1986
|
+
T.let(
|
|
1987
|
+
:semi_annual,
|
|
1988
|
+
Orb::PriceCreateParams::Body::EventOutput::Cadence::TaggedSymbol
|
|
1989
|
+
)
|
|
1990
|
+
MONTHLY =
|
|
1991
|
+
T.let(
|
|
1992
|
+
:monthly,
|
|
1993
|
+
Orb::PriceCreateParams::Body::EventOutput::Cadence::TaggedSymbol
|
|
1994
|
+
)
|
|
1995
|
+
QUARTERLY =
|
|
1996
|
+
T.let(
|
|
1997
|
+
:quarterly,
|
|
1998
|
+
Orb::PriceCreateParams::Body::EventOutput::Cadence::TaggedSymbol
|
|
1999
|
+
)
|
|
2000
|
+
ONE_TIME =
|
|
2001
|
+
T.let(
|
|
2002
|
+
:one_time,
|
|
2003
|
+
Orb::PriceCreateParams::Body::EventOutput::Cadence::TaggedSymbol
|
|
2004
|
+
)
|
|
2005
|
+
CUSTOM =
|
|
2006
|
+
T.let(
|
|
2007
|
+
:custom,
|
|
2008
|
+
Orb::PriceCreateParams::Body::EventOutput::Cadence::TaggedSymbol
|
|
2009
|
+
)
|
|
2818
2010
|
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2011
|
+
sig do
|
|
2012
|
+
override.returns(
|
|
2013
|
+
T::Array[
|
|
2014
|
+
Orb::PriceCreateParams::Body::EventOutput::Cadence::TaggedSymbol
|
|
2015
|
+
]
|
|
2016
|
+
)
|
|
2017
|
+
end
|
|
2018
|
+
def self.values
|
|
2019
|
+
end
|
|
2823
2020
|
end
|
|
2824
2021
|
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2022
|
+
class EventOutputConfig < Orb::Internal::Type::BaseModel
|
|
2023
|
+
OrHash =
|
|
2024
|
+
T.type_alias do
|
|
2025
|
+
T.any(
|
|
2026
|
+
Orb::PriceCreateParams::Body::EventOutput::EventOutputConfig,
|
|
2027
|
+
Orb::Internal::AnyHash
|
|
2028
|
+
)
|
|
2029
|
+
end
|
|
2030
|
+
|
|
2031
|
+
# The key in the event data to extract the unit rate from.
|
|
2032
|
+
sig { returns(String) }
|
|
2033
|
+
attr_accessor :unit_rating_key
|
|
2034
|
+
|
|
2035
|
+
# If provided, this amount will be used as the unit rate when an event does not
|
|
2036
|
+
# have a value for the `unit_rating_key`. If not provided, events missing a unit
|
|
2037
|
+
# rate will be ignored.
|
|
2038
|
+
sig { returns(T.nilable(String)) }
|
|
2039
|
+
attr_accessor :default_unit_rate
|
|
2040
|
+
|
|
2041
|
+
# An optional key in the event data to group by (e.g., event ID). All events will
|
|
2042
|
+
# also be grouped by their unit rate.
|
|
2043
|
+
sig { returns(T.nilable(String)) }
|
|
2044
|
+
attr_accessor :grouping_key
|
|
2045
|
+
|
|
2046
|
+
# Configuration for event_output pricing
|
|
2047
|
+
sig do
|
|
2048
|
+
params(
|
|
2049
|
+
unit_rating_key: String,
|
|
2050
|
+
default_unit_rate: T.nilable(String),
|
|
2051
|
+
grouping_key: T.nilable(String)
|
|
2052
|
+
).returns(T.attached_class)
|
|
2053
|
+
end
|
|
2054
|
+
def self.new(
|
|
2055
|
+
# The key in the event data to extract the unit rate from.
|
|
2056
|
+
unit_rating_key:,
|
|
2057
|
+
# If provided, this amount will be used as the unit rate when an event does not
|
|
2058
|
+
# have a value for the `unit_rating_key`. If not provided, events missing a unit
|
|
2059
|
+
# rate will be ignored.
|
|
2060
|
+
default_unit_rate: nil,
|
|
2061
|
+
# An optional key in the event data to group by (e.g., event ID). All events will
|
|
2062
|
+
# also be grouped by their unit rate.
|
|
2063
|
+
grouping_key: nil
|
|
2848
2064
|
)
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
# The key in the event data to extract the unit rate from.
|
|
2852
|
-
sig { returns(String) }
|
|
2853
|
-
attr_accessor :unit_rating_key
|
|
2854
|
-
|
|
2855
|
-
# If provided, this amount will be used as the unit rate when an event does not
|
|
2856
|
-
# have a value for the `unit_rating_key`. If not provided, events missing a unit
|
|
2857
|
-
# rate will be ignored.
|
|
2858
|
-
sig { returns(T.nilable(String)) }
|
|
2859
|
-
attr_accessor :default_unit_rate
|
|
2860
|
-
|
|
2861
|
-
# An optional key in the event data to group by (e.g., event ID). All events will
|
|
2862
|
-
# also be grouped by their unit rate.
|
|
2863
|
-
sig { returns(T.nilable(String)) }
|
|
2864
|
-
attr_accessor :grouping_key
|
|
2065
|
+
end
|
|
2865
2066
|
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
# have a value for the `unit_rating_key`. If not provided, events missing a unit
|
|
2879
|
-
# rate will be ignored.
|
|
2880
|
-
default_unit_rate: nil,
|
|
2881
|
-
# An optional key in the event data to group by (e.g., event ID). All events will
|
|
2882
|
-
# also be grouped by their unit rate.
|
|
2883
|
-
grouping_key: nil
|
|
2884
|
-
)
|
|
2067
|
+
sig do
|
|
2068
|
+
override.returns(
|
|
2069
|
+
{
|
|
2070
|
+
unit_rating_key: String,
|
|
2071
|
+
default_unit_rate: T.nilable(String),
|
|
2072
|
+
grouping_key: T.nilable(String)
|
|
2073
|
+
}
|
|
2074
|
+
)
|
|
2075
|
+
end
|
|
2076
|
+
def to_hash
|
|
2077
|
+
end
|
|
2078
|
+
end
|
|
2885
2079
|
end
|
|
2886
2080
|
|
|
2887
2081
|
sig do
|
|
2888
|
-
override.returns(
|
|
2889
|
-
{
|
|
2890
|
-
unit_rating_key: String,
|
|
2891
|
-
default_unit_rate: T.nilable(String),
|
|
2892
|
-
grouping_key: T.nilable(String)
|
|
2893
|
-
}
|
|
2894
|
-
)
|
|
2082
|
+
override.returns(T::Array[Orb::PriceCreateParams::Body::Variants])
|
|
2895
2083
|
end
|
|
2896
|
-
def
|
|
2084
|
+
def self.variants
|
|
2897
2085
|
end
|
|
2898
2086
|
end
|
|
2899
2087
|
end
|