orb-billing 1.13.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +55 -0
- data/README.md +1 -1
- data/lib/orb/client.rb +21 -0
- data/lib/orb/internal/transport/base_client.rb +5 -0
- data/lib/orb/internal/type/union.rb +13 -27
- data/lib/orb/internal/util.rb +22 -7
- data/lib/orb/models/accounting_provider_config.rb +14 -3
- data/lib/orb/models/adjustment_interval.rb +185 -3
- data/lib/orb/models/alert.rb +114 -1
- data/lib/orb/models/alert_create_for_customer_params.rb +8 -1
- data/lib/orb/models/alert_create_for_external_customer_params.rb +8 -1
- data/lib/orb/models/alert_create_for_subscription_params.rb +142 -1
- data/lib/orb/models/alert_disable_params.rb +8 -1
- data/lib/orb/models/alert_enable_params.rb +8 -1
- data/lib/orb/models/alert_retrieve_params.rb +7 -1
- data/lib/orb/models/alert_update_params.rb +120 -1
- data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +3296 -631
- data/lib/orb/models/beta/external_plan_id_fetch_plan_version_params.rb +7 -1
- data/lib/orb/models/beta/external_plan_id_set_default_plan_version_params.rb +8 -1
- data/lib/orb/models/beta_create_plan_version_params.rb +3263 -622
- data/lib/orb/models/beta_fetch_plan_version_params.rb +7 -1
- data/lib/orb/models/beta_set_default_plan_version_params.rb +8 -1
- data/lib/orb/models/changed_subscription_resources.rb +200 -10
- data/lib/orb/models/conversion_rate_config.rb +18 -0
- data/lib/orb/models/coupon_archive_params.rb +7 -1
- data/lib/orb/models/coupon_fetch_params.rb +7 -1
- data/lib/orb/models/coupons/subscription_list_params.rb +8 -1
- data/lib/orb/models/credit_block_delete_params.rb +7 -1
- data/lib/orb/models/credit_block_list_invoices_params.rb +7 -1
- data/lib/orb/models/credit_block_list_invoices_response.rb +155 -1
- data/lib/orb/models/credit_block_retrieve_params.rb +7 -1
- data/lib/orb/models/credit_block_retrieve_response.rb +150 -1
- data/lib/orb/models/credit_note_fetch_params.rb +7 -1
- data/lib/orb/models/customer.rb +122 -3
- data/lib/orb/models/customer_create_params.rb +17 -1
- data/lib/orb/models/customer_delete_params.rb +7 -1
- data/lib/orb/models/customer_fetch_by_external_id_params.rb +7 -1
- data/lib/orb/models/customer_fetch_params.rb +7 -1
- data/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rb +7 -1
- data/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rb +7 -1
- data/lib/orb/models/customer_tax_id.rb +15 -1
- data/lib/orb/models/customer_update_by_external_id_params.rb +39 -5
- data/lib/orb/models/customer_update_params.rb +39 -5
- data/lib/orb/models/customers/balance_transaction_create_params.rb +8 -1
- data/lib/orb/models/customers/balance_transaction_list_params.rb +8 -1
- data/lib/orb/models/customers/cost_list_by_external_id_params.rb +8 -1
- data/lib/orb/models/customers/cost_list_params.rb +8 -1
- data/lib/orb/models/customers/credit_list_by_external_id_params.rb +8 -1
- data/lib/orb/models/customers/credit_list_by_external_id_response.rb +155 -1
- data/lib/orb/models/customers/credit_list_params.rb +8 -1
- data/lib/orb/models/customers/credit_list_response.rb +152 -1
- data/lib/orb/models/customers/credits/decrement_ledger_entry.rb +5 -1
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +582 -315
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +580 -313
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +8 -1
- data/lib/orb/models/customers/credits/ledger_list_params.rb +8 -1
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +8 -1
- data/lib/orb/models/customers/credits/top_up_create_params.rb +8 -1
- data/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rb +7 -1
- data/lib/orb/models/customers/credits/top_up_delete_params.rb +7 -1
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +8 -1
- data/lib/orb/models/customers/credits/top_up_list_params.rb +8 -1
- data/lib/orb/models/dimensional_price_group.rb +1 -1
- data/lib/orb/models/dimensional_price_group_retrieve_params.rb +7 -1
- data/lib/orb/models/dimensional_price_group_update_params.rb +8 -1
- data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rb +7 -1
- data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rb +8 -1
- data/lib/orb/models/discount.rb +145 -1
- data/lib/orb/models/event_deprecate_params.rb +7 -1
- data/lib/orb/models/event_ingest_params.rb +5 -2
- data/lib/orb/models/event_update_params.rb +8 -1
- data/lib/orb/models/events/backfill_close_params.rb +7 -1
- data/lib/orb/models/events/backfill_fetch_params.rb +7 -1
- data/lib/orb/models/events/backfill_revert_params.rb +7 -1
- data/lib/orb/models/invoice.rb +198 -10
- data/lib/orb/models/invoice_create_params.rb +6 -5
- data/lib/orb/models/invoice_delete_line_item_params.rb +7 -1
- data/lib/orb/models/invoice_fetch_params.rb +7 -1
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +200 -10
- data/lib/orb/models/invoice_issue_params.rb +8 -1
- data/lib/orb/models/invoice_issue_summary_params.rb +8 -1
- data/lib/orb/models/invoice_issue_summary_response.rb +9 -3
- data/lib/orb/models/invoice_level_discount.rb +145 -1
- data/lib/orb/models/invoice_line_item_create_response.rb +189 -5
- data/lib/orb/models/invoice_list_summary_response.rb +9 -3
- data/lib/orb/models/invoice_mark_paid_params.rb +8 -1
- data/lib/orb/models/invoice_pay_params.rb +16 -1
- data/lib/orb/models/invoice_update_params.rb +8 -1
- data/lib/orb/models/invoice_void_params.rb +7 -1
- data/lib/orb/models/item_archive_params.rb +7 -1
- data/lib/orb/models/item_fetch_params.rb +7 -1
- data/lib/orb/models/item_update_params.rb +8 -1
- data/lib/orb/models/license_deactivate_params.rb +8 -1
- data/lib/orb/models/license_retrieve_by_external_id_params.rb +8 -1
- data/lib/orb/models/license_retrieve_params.rb +7 -1
- data/lib/orb/models/license_type_retrieve_params.rb +7 -1
- data/lib/orb/models/licenses/external_license_get_usage_params.rb +11 -4
- data/lib/orb/models/licenses/usage_get_all_usage_params.rb +3 -3
- data/lib/orb/models/licenses/usage_get_usage_params.rb +11 -4
- data/lib/orb/models/metric_fetch_params.rb +7 -1
- data/lib/orb/models/metric_update_params.rb +8 -1
- data/lib/orb/models/mutated_subscription.rb +169 -4
- data/lib/orb/models/new_allocation_price.rb +11 -1
- data/lib/orb/models/new_floating_bulk_price.rb +1 -3
- data/lib/orb/models/new_floating_bulk_with_proration_price.rb +1 -3
- data/lib/orb/models/new_floating_cumulative_grouped_bulk_price.rb +1 -3
- data/lib/orb/models/new_floating_grouped_allocation_price.rb +1 -3
- data/lib/orb/models/new_floating_grouped_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_floating_grouped_tiered_price.rb +1 -3
- data/lib/orb/models/new_floating_grouped_with_metered_minimum_price.rb +1 -3
- data/lib/orb/models/new_floating_grouped_with_prorated_minimum_price.rb +1 -3
- data/lib/orb/models/new_floating_matrix_price.rb +1 -3
- data/lib/orb/models/new_floating_matrix_with_allocation_price.rb +1 -3
- data/lib/orb/models/new_floating_matrix_with_display_name_price.rb +1 -3
- data/lib/orb/models/new_floating_max_group_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_floating_minimum_composite_price.rb +1 -3
- data/lib/orb/models/new_floating_package_price.rb +1 -3
- data/lib/orb/models/new_floating_package_with_allocation_price.rb +1 -3
- data/lib/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rb +1 -3
- data/lib/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rb +1 -3
- data/lib/orb/models/new_floating_threshold_total_amount_price.rb +1 -3
- data/lib/orb/models/new_floating_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_floating_tiered_package_with_minimum_price.rb +1 -3
- data/lib/orb/models/new_floating_tiered_price.rb +1 -3
- data/lib/orb/models/new_floating_tiered_with_minimum_price.rb +1 -3
- data/lib/orb/models/new_floating_tiered_with_proration_price.rb +1 -3
- data/lib/orb/models/new_floating_unit_price.rb +1 -3
- data/lib/orb/models/new_floating_unit_with_percent_price.rb +1 -3
- data/lib/orb/models/new_floating_unit_with_proration_price.rb +1 -3
- data/lib/orb/models/new_plan_bulk_price.rb +1 -1
- data/lib/orb/models/new_plan_bulk_with_proration_price.rb +1 -3
- data/lib/orb/models/new_plan_cumulative_grouped_bulk_price.rb +1 -3
- data/lib/orb/models/new_plan_grouped_allocation_price.rb +1 -3
- data/lib/orb/models/new_plan_grouped_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_plan_grouped_tiered_price.rb +1 -3
- data/lib/orb/models/new_plan_grouped_with_metered_minimum_price.rb +1 -3
- data/lib/orb/models/new_plan_grouped_with_prorated_minimum_price.rb +1 -3
- data/lib/orb/models/new_plan_matrix_price.rb +1 -5
- data/lib/orb/models/new_plan_matrix_with_allocation_price.rb +1 -3
- data/lib/orb/models/new_plan_matrix_with_display_name_price.rb +1 -3
- data/lib/orb/models/new_plan_max_group_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_plan_minimum_composite_price.rb +1 -3
- data/lib/orb/models/new_plan_package_price.rb +1 -5
- data/lib/orb/models/new_plan_package_with_allocation_price.rb +1 -3
- data/lib/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rb +1 -3
- data/lib/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rb +1 -3
- data/lib/orb/models/new_plan_threshold_total_amount_price.rb +1 -3
- data/lib/orb/models/new_plan_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_plan_tiered_package_with_minimum_price.rb +1 -3
- data/lib/orb/models/new_plan_tiered_price.rb +1 -5
- data/lib/orb/models/new_plan_tiered_with_minimum_price.rb +1 -3
- data/lib/orb/models/new_plan_unit_price.rb +1 -1
- data/lib/orb/models/new_plan_unit_with_percent_price.rb +1 -3
- data/lib/orb/models/new_plan_unit_with_proration_price.rb +1 -3
- data/lib/orb/models/new_subscription_bulk_price.rb +1 -3
- data/lib/orb/models/new_subscription_bulk_with_proration_price.rb +1 -3
- data/lib/orb/models/new_subscription_cumulative_grouped_bulk_price.rb +1 -3
- data/lib/orb/models/new_subscription_grouped_allocation_price.rb +1 -3
- data/lib/orb/models/new_subscription_grouped_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_subscription_grouped_tiered_price.rb +1 -3
- data/lib/orb/models/new_subscription_grouped_with_metered_minimum_price.rb +1 -3
- data/lib/orb/models/new_subscription_grouped_with_prorated_minimum_price.rb +1 -3
- data/lib/orb/models/new_subscription_matrix_price.rb +1 -3
- data/lib/orb/models/new_subscription_matrix_with_allocation_price.rb +1 -3
- data/lib/orb/models/new_subscription_matrix_with_display_name_price.rb +1 -3
- data/lib/orb/models/new_subscription_max_group_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_subscription_minimum_composite_price.rb +1 -3
- data/lib/orb/models/new_subscription_package_price.rb +1 -3
- data/lib/orb/models/new_subscription_package_with_allocation_price.rb +1 -3
- data/lib/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rb +1 -3
- data/lib/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rb +1 -3
- data/lib/orb/models/new_subscription_threshold_total_amount_price.rb +1 -3
- data/lib/orb/models/new_subscription_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_subscription_tiered_package_with_minimum_price.rb +1 -3
- data/lib/orb/models/new_subscription_tiered_price.rb +1 -3
- data/lib/orb/models/new_subscription_tiered_with_minimum_price.rb +1 -3
- data/lib/orb/models/new_subscription_unit_price.rb +1 -3
- data/lib/orb/models/new_subscription_unit_with_percent_price.rb +1 -3
- data/lib/orb/models/new_subscription_unit_with_proration_price.rb +1 -3
- data/lib/orb/models/per_price_cost.rb +2 -2
- data/lib/orb/models/plan.rb +189 -9
- data/lib/orb/models/plan_create_params.rb +1478 -158
- data/lib/orb/models/plan_fetch_params.rb +7 -1
- data/lib/orb/models/plan_update_params.rb +16 -1
- data/lib/orb/models/plan_version.rb +186 -5
- data/lib/orb/models/plans/external_plan_id_fetch_params.rb +7 -1
- data/lib/orb/models/plans/external_plan_id_update_params.rb +16 -1
- data/lib/orb/models/plans/migration_cancel_params.rb +7 -1
- data/lib/orb/models/plans/migration_cancel_response.rb +22 -4
- data/lib/orb/models/plans/migration_list_params.rb +8 -1
- data/lib/orb/models/plans/migration_list_response.rb +22 -4
- data/lib/orb/models/plans/migration_retrieve_params.rb +7 -1
- data/lib/orb/models/plans/migration_retrieve_response.rb +22 -4
- data/lib/orb/models/price.rb +2807 -1244
- data/lib/orb/models/price_create_params.rb +1800 -1355
- data/lib/orb/models/price_evaluate_multiple_params.rb +889 -54
- data/lib/orb/models/price_evaluate_params.rb +8 -1
- data/lib/orb/models/price_evaluate_preview_events_params.rb +881 -46
- data/lib/orb/models/price_fetch_params.rb +7 -1
- data/lib/orb/models/price_interval.rb +2 -2
- data/lib/orb/models/price_update_params.rb +8 -1
- data/lib/orb/models/prices/external_price_id_fetch_params.rb +7 -1
- data/lib/orb/models/prices/external_price_id_update_params.rb +8 -1
- data/lib/orb/models/subscription.rb +168 -4
- data/lib/orb/models/subscription_cancel_params.rb +8 -1
- data/lib/orb/models/subscription_change_apply_params.rb +8 -1
- data/lib/orb/models/subscription_change_cancel_params.rb +7 -1
- data/lib/orb/models/subscription_change_retrieve_params.rb +7 -1
- data/lib/orb/models/subscription_create_params.rb +2818 -674
- data/lib/orb/models/subscription_fetch_costs_params.rb +8 -1
- data/lib/orb/models/subscription_fetch_params.rb +7 -1
- data/lib/orb/models/subscription_fetch_schedule_params.rb +8 -1
- data/lib/orb/models/subscription_fetch_usage_params.rb +8 -1
- data/lib/orb/models/subscription_price_intervals_params.rb +1103 -55
- data/lib/orb/models/subscription_redeem_coupon_params.rb +8 -1
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +2839 -685
- data/lib/orb/models/subscription_trigger_phase_params.rb +8 -1
- data/lib/orb/models/subscription_unschedule_cancellation_params.rb +7 -1
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rb +8 -1
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb +7 -1
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +8 -1
- data/lib/orb/models/subscription_update_params.rb +19 -1
- data/lib/orb/models/subscription_update_trial_params.rb +8 -1
- data/lib/orb/models.rb +2 -0
- data/lib/orb/resources/alerts.rb +20 -2
- data/lib/orb/resources/coupons.rb +1 -2
- data/lib/orb/resources/credit_blocks.rb +11 -8
- data/lib/orb/resources/customers/credits/ledger.rb +40 -81
- data/lib/orb/resources/customers.rb +12 -7
- data/lib/orb/resources/events/backfills.rb +3 -4
- data/lib/orb/resources/events.rb +7 -34
- data/lib/orb/resources/invoices.rb +18 -7
- data/lib/orb/resources/licenses/external_licenses.rb +1 -1
- data/lib/orb/resources/licenses/usage.rb +2 -2
- data/lib/orb/resources/metrics.rb +5 -5
- data/lib/orb/resources/plans/external_plan_id.rb +5 -3
- data/lib/orb/resources/plans.rb +9 -5
- data/lib/orb/resources/prices/external_price_id.rb +2 -2
- data/lib/orb/resources/prices.rb +13 -104
- data/lib/orb/resources/subscriptions.rb +24 -7
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +1 -0
- data/rbi/orb/client.rbi +6 -0
- data/rbi/orb/internal/util.rbi +8 -0
- data/rbi/orb/models/accounting_provider_config.rbi +38 -5
- data/rbi/orb/models/adjustment_interval.rbi +336 -0
- data/rbi/orb/models/alert.rbi +182 -3
- data/rbi/orb/models/alert_create_for_customer_params.rbi +6 -0
- data/rbi/orb/models/alert_create_for_external_customer_params.rbi +6 -0
- data/rbi/orb/models/alert_create_for_subscription_params.rbi +285 -0
- data/rbi/orb/models/alert_disable_params.rbi +6 -0
- data/rbi/orb/models/alert_enable_params.rbi +6 -0
- data/rbi/orb/models/alert_retrieve_params.rbi +13 -5
- data/rbi/orb/models/alert_update_params.rbi +214 -0
- data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +5873 -1161
- data/rbi/orb/models/beta/external_plan_id_fetch_plan_version_params.rbi +10 -2
- data/rbi/orb/models/beta/external_plan_id_set_default_plan_version_params.rbi +10 -1
- data/rbi/orb/models/beta_create_plan_version_params.rbi +5877 -1165
- data/rbi/orb/models/beta_fetch_plan_version_params.rbi +10 -2
- data/rbi/orb/models/beta_set_default_plan_version_params.rbi +10 -1
- data/rbi/orb/models/changed_subscription_resources.rbi +360 -5
- data/rbi/orb/models/conversion_rate_config.rbi +18 -0
- data/rbi/orb/models/coupon_archive_params.rbi +13 -5
- data/rbi/orb/models/coupon_fetch_params.rbi +13 -5
- data/rbi/orb/models/coupons/subscription_list_params.rbi +6 -0
- data/rbi/orb/models/credit_block_delete_params.rbi +13 -5
- data/rbi/orb/models/credit_block_list_invoices_params.rbi +13 -5
- data/rbi/orb/models/credit_block_list_invoices_response.rbi +346 -3
- data/rbi/orb/models/credit_block_retrieve_params.rbi +13 -5
- data/rbi/orb/models/credit_block_retrieve_response.rbi +344 -3
- data/rbi/orb/models/credit_note_fetch_params.rbi +13 -5
- data/rbi/orb/models/customer.rbi +202 -0
- data/rbi/orb/models/customer_create_params.rbi +27 -0
- data/rbi/orb/models/customer_delete_params.rbi +13 -5
- data/rbi/orb/models/customer_fetch_by_external_id_params.rbi +13 -5
- data/rbi/orb/models/customer_fetch_params.rbi +13 -5
- data/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +13 -5
- data/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +13 -5
- data/rbi/orb/models/customer_tax_id.rbi +15 -1
- data/rbi/orb/models/customer_update_by_external_id_params.rbi +51 -4
- data/rbi/orb/models/customer_update_params.rbi +51 -4
- data/rbi/orb/models/customers/balance_transaction_create_params.rbi +6 -0
- data/rbi/orb/models/customers/balance_transaction_list_params.rbi +6 -0
- data/rbi/orb/models/customers/cost_list_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/customers/cost_list_params.rbi +6 -0
- data/rbi/orb/models/customers/credit_list_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +346 -3
- data/rbi/orb/models/customers/credit_list_params.rbi +6 -0
- data/rbi/orb/models/customers/credit_list_response.rbi +347 -3
- data/rbi/orb/models/customers/credits/decrement_ledger_entry.rbi +4 -0
- data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +861 -478
- data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +861 -478
- data/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/ledger_list_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/top_up_create_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +6 -1
- data/rbi/orb/models/customers/credits/top_up_delete_params.rbi +10 -2
- data/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/top_up_list_params.rbi +6 -0
- data/rbi/orb/models/dimensional_price_group.rbi +1 -1
- data/rbi/orb/models/dimensional_price_group_retrieve_params.rbi +16 -5
- data/rbi/orb/models/dimensional_price_group_update_params.rbi +6 -0
- data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +16 -5
- data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbi +6 -0
- data/rbi/orb/models/discount.rbi +269 -1
- data/rbi/orb/models/event_deprecate_params.rbi +13 -5
- data/rbi/orb/models/event_ingest_params.rbi +4 -2
- data/rbi/orb/models/event_update_params.rbi +6 -0
- data/rbi/orb/models/events/backfill_close_params.rbi +13 -5
- data/rbi/orb/models/events/backfill_fetch_params.rbi +13 -5
- data/rbi/orb/models/events/backfill_revert_params.rbi +13 -5
- data/rbi/orb/models/invoice.rbi +360 -5
- data/rbi/orb/models/invoice_create_params.rbi +12 -7
- data/rbi/orb/models/invoice_delete_line_item_params.rbi +10 -2
- data/rbi/orb/models/invoice_fetch_params.rbi +13 -5
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +360 -5
- data/rbi/orb/models/invoice_issue_params.rbi +10 -1
- data/rbi/orb/models/invoice_issue_summary_params.rbi +10 -1
- data/rbi/orb/models/invoice_issue_summary_response.rbi +19 -4
- data/rbi/orb/models/invoice_level_discount.rbi +298 -1
- data/rbi/orb/models/invoice_line_item_create_response.rbi +339 -0
- data/rbi/orb/models/invoice_list_summary_response.rbi +19 -4
- data/rbi/orb/models/invoice_mark_paid_params.rbi +6 -0
- data/rbi/orb/models/invoice_pay_params.rbi +27 -5
- data/rbi/orb/models/invoice_update_params.rbi +6 -0
- data/rbi/orb/models/invoice_void_params.rbi +13 -5
- data/rbi/orb/models/item_archive_params.rbi +13 -5
- data/rbi/orb/models/item_fetch_params.rbi +13 -5
- data/rbi/orb/models/item_update_params.rbi +6 -0
- data/rbi/orb/models/license_deactivate_params.rbi +10 -1
- data/rbi/orb/models/license_retrieve_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/license_retrieve_params.rbi +13 -5
- data/rbi/orb/models/license_type_retrieve_params.rbi +13 -5
- data/rbi/orb/models/licenses/external_license_get_usage_params.rbi +9 -3
- data/rbi/orb/models/licenses/usage_get_all_usage_params.rbi +3 -3
- data/rbi/orb/models/licenses/usage_get_usage_params.rbi +9 -3
- data/rbi/orb/models/metric_fetch_params.rbi +13 -5
- data/rbi/orb/models/metric_update_params.rbi +6 -0
- data/rbi/orb/models/mutated_subscription.rbi +324 -2
- data/rbi/orb/models/new_allocation_price.rbi +12 -0
- data/rbi/orb/models/per_price_cost.rbi +3 -0
- data/rbi/orb/models/plan.rbi +339 -2
- data/rbi/orb/models/plan_create_params.rbi +2566 -209
- data/rbi/orb/models/plan_fetch_params.rbi +13 -5
- data/rbi/orb/models/plan_update_params.rbi +14 -0
- data/rbi/orb/models/plan_version.rbi +339 -0
- data/rbi/orb/models/plans/external_plan_id_fetch_params.rbi +13 -5
- data/rbi/orb/models/plans/external_plan_id_update_params.rbi +14 -0
- data/rbi/orb/models/plans/migration_cancel_params.rbi +10 -2
- data/rbi/orb/models/plans/migration_cancel_response.rbi +22 -1
- data/rbi/orb/models/plans/migration_list_params.rbi +6 -0
- data/rbi/orb/models/plans/migration_list_response.rbi +22 -1
- data/rbi/orb/models/plans/migration_retrieve_params.rbi +10 -2
- data/rbi/orb/models/plans/migration_retrieve_response.rbi +22 -1
- data/rbi/orb/models/price.rbi +4733 -2280
- data/rbi/orb/models/price_create_params.rbi +3022 -2408
- data/rbi/orb/models/price_evaluate_multiple_params.rbi +1540 -114
- data/rbi/orb/models/price_evaluate_params.rbi +6 -0
- data/rbi/orb/models/price_evaluate_preview_events_params.rbi +1540 -114
- data/rbi/orb/models/price_fetch_params.rbi +13 -5
- data/rbi/orb/models/price_interval.rbi +3 -0
- data/rbi/orb/models/price_update_params.rbi +6 -0
- data/rbi/orb/models/prices/external_price_id_fetch_params.rbi +13 -5
- data/rbi/orb/models/prices/external_price_id_update_params.rbi +6 -0
- data/rbi/orb/models/subscription.rbi +324 -2
- data/rbi/orb/models/subscription_cancel_params.rbi +6 -0
- data/rbi/orb/models/subscription_change_apply_params.rbi +6 -0
- data/rbi/orb/models/subscription_change_cancel_params.rbi +16 -5
- data/rbi/orb/models/subscription_change_retrieve_params.rbi +16 -5
- data/rbi/orb/models/subscription_create_params.rbi +4998 -1186
- data/rbi/orb/models/subscription_fetch_costs_params.rbi +6 -0
- data/rbi/orb/models/subscription_fetch_params.rbi +13 -5
- data/rbi/orb/models/subscription_fetch_schedule_params.rbi +6 -0
- data/rbi/orb/models/subscription_fetch_usage_params.rbi +6 -0
- data/rbi/orb/models/subscription_price_intervals_params.rbi +2133 -264
- data/rbi/orb/models/subscription_redeem_coupon_params.rbi +6 -0
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +5001 -1183
- data/rbi/orb/models/subscription_trigger_phase_params.rbi +6 -0
- data/rbi/orb/models/subscription_unschedule_cancellation_params.rbi +13 -5
- data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +10 -1
- data/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +13 -5
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +6 -0
- data/rbi/orb/models/subscription_update_params.rbi +20 -0
- data/rbi/orb/models/subscription_update_trial_params.rbi +6 -0
- data/rbi/orb/models.rbi +2 -0
- data/rbi/orb/resources/alerts.rbi +43 -0
- data/rbi/orb/resources/coupons.rbi +1 -2
- data/rbi/orb/resources/credit_blocks.rbi +10 -7
- data/rbi/orb/resources/customers/credits/ledger.rbi +50 -146
- data/rbi/orb/resources/customers.rbi +35 -7
- data/rbi/orb/resources/events/backfills.rbi +3 -4
- data/rbi/orb/resources/events.rbi +8 -35
- data/rbi/orb/resources/invoices.rbi +20 -6
- data/rbi/orb/resources/licenses/external_licenses.rbi +1 -1
- data/rbi/orb/resources/licenses/usage.rbi +2 -2
- data/rbi/orb/resources/metrics.rbi +5 -5
- data/rbi/orb/resources/plans/external_plan_id.rbi +5 -2
- data/rbi/orb/resources/plans.rbi +9 -3
- data/rbi/orb/resources/prices.rbi +38 -184
- data/rbi/orb/resources/subscriptions.rbi +33 -4
- data/sig/orb/client.rbs +3 -0
- data/sig/orb/internal/util.rbs +4 -0
- data/sig/orb/models/accounting_provider_config.rbs +21 -4
- data/sig/orb/models/adjustment_interval.rbs +134 -0
- data/sig/orb/models/alert.rbs +90 -3
- data/sig/orb/models/alert_create_for_customer_params.rbs +5 -0
- data/sig/orb/models/alert_create_for_external_customer_params.rbs +5 -0
- data/sig/orb/models/alert_create_for_subscription_params.rbs +98 -1
- data/sig/orb/models/alert_disable_params.rbs +6 -1
- data/sig/orb/models/alert_enable_params.rbs +6 -1
- data/sig/orb/models/alert_retrieve_params.rbs +9 -3
- data/sig/orb/models/alert_update_params.rbs +90 -1
- data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +2318 -397
- data/sig/orb/models/beta/external_plan_id_fetch_plan_version_params.rbs +6 -1
- data/sig/orb/models/beta/external_plan_id_set_default_plan_version_params.rbs +6 -1
- data/sig/orb/models/beta_create_plan_version_params.rbs +2300 -389
- data/sig/orb/models/beta_fetch_plan_version_params.rbs +10 -2
- data/sig/orb/models/beta_set_default_plan_version_params.rbs +10 -2
- data/sig/orb/models/changed_subscription_resources.rbs +140 -1
- data/sig/orb/models/conversion_rate_config.rbs +12 -0
- data/sig/orb/models/coupon_archive_params.rbs +12 -3
- data/sig/orb/models/coupon_fetch_params.rbs +12 -3
- data/sig/orb/models/coupons/subscription_list_params.rbs +5 -1
- data/sig/orb/models/credit_block_delete_params.rbs +8 -3
- data/sig/orb/models/credit_block_list_invoices_params.rbs +8 -3
- data/sig/orb/models/credit_block_list_invoices_response.rbs +124 -3
- data/sig/orb/models/credit_block_retrieve_params.rbs +8 -3
- data/sig/orb/models/credit_block_retrieve_response.rbs +124 -3
- data/sig/orb/models/credit_note_fetch_params.rbs +11 -3
- data/sig/orb/models/customer.rbs +79 -1
- data/sig/orb/models/customer_create_params.rbs +12 -1
- data/sig/orb/models/customer_delete_params.rbs +12 -3
- data/sig/orb/models/customer_fetch_by_external_id_params.rbs +11 -3
- data/sig/orb/models/customer_fetch_params.rbs +12 -3
- data/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs +11 -3
- data/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs +11 -3
- data/sig/orb/models/customer_tax_id.rbs +20 -2
- data/sig/orb/models/customer_update_by_external_id_params.rbs +22 -1
- data/sig/orb/models/customer_update_params.rbs +22 -1
- data/sig/orb/models/customers/balance_transaction_create_params.rbs +5 -0
- data/sig/orb/models/customers/balance_transaction_list_params.rbs +5 -0
- data/sig/orb/models/customers/cost_list_by_external_id_params.rbs +5 -0
- data/sig/orb/models/customers/cost_list_params.rbs +5 -0
- data/sig/orb/models/customers/credit_list_by_external_id_params.rbs +5 -0
- data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +124 -3
- data/sig/orb/models/customers/credit_list_params.rbs +5 -0
- data/sig/orb/models/customers/credit_list_response.rbs +124 -3
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +345 -157
- data/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +345 -157
- data/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs +5 -0
- data/sig/orb/models/customers/credits/ledger_list_params.rbs +5 -0
- data/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs +5 -0
- data/sig/orb/models/customers/credits/top_up_create_params.rbs +5 -0
- data/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs +5 -1
- data/sig/orb/models/customers/credits/top_up_delete_params.rbs +6 -1
- data/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs +5 -1
- data/sig/orb/models/customers/credits/top_up_list_params.rbs +5 -1
- data/sig/orb/models/dimensional_price_group_retrieve_params.rbs +12 -3
- data/sig/orb/models/dimensional_price_group_update_params.rbs +5 -0
- data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs +12 -3
- data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbs +5 -0
- data/sig/orb/models/discount.rbs +114 -0
- data/sig/orb/models/event_deprecate_params.rbs +9 -3
- data/sig/orb/models/event_update_params.rbs +5 -0
- data/sig/orb/models/events/backfill_close_params.rbs +11 -3
- data/sig/orb/models/events/backfill_fetch_params.rbs +11 -3
- data/sig/orb/models/events/backfill_revert_params.rbs +11 -3
- data/sig/orb/models/invoice.rbs +140 -1
- data/sig/orb/models/invoice_delete_line_item_params.rbs +6 -1
- data/sig/orb/models/invoice_fetch_params.rbs +12 -3
- data/sig/orb/models/invoice_fetch_upcoming_response.rbs +140 -1
- data/sig/orb/models/invoice_issue_params.rbs +6 -1
- data/sig/orb/models/invoice_issue_summary_params.rbs +6 -1
- data/sig/orb/models/invoice_issue_summary_response.rbs +2 -1
- data/sig/orb/models/invoice_level_discount.rbs +117 -1
- data/sig/orb/models/invoice_line_item_create_response.rbs +134 -0
- data/sig/orb/models/invoice_list_summary_response.rbs +2 -1
- data/sig/orb/models/invoice_mark_paid_params.rbs +10 -1
- data/sig/orb/models/invoice_pay_params.rbs +17 -3
- data/sig/orb/models/invoice_update_params.rbs +5 -0
- data/sig/orb/models/invoice_void_params.rbs +12 -3
- data/sig/orb/models/item_archive_params.rbs +9 -3
- data/sig/orb/models/item_fetch_params.rbs +9 -3
- data/sig/orb/models/item_update_params.rbs +5 -0
- data/sig/orb/models/license_deactivate_params.rbs +10 -2
- data/sig/orb/models/license_retrieve_by_external_id_params.rbs +9 -1
- data/sig/orb/models/license_retrieve_params.rbs +11 -3
- data/sig/orb/models/license_type_retrieve_params.rbs +11 -3
- data/sig/orb/models/licenses/external_license_get_usage_params.rbs +9 -4
- data/sig/orb/models/licenses/usage_get_all_usage_params.rbs +4 -4
- data/sig/orb/models/licenses/usage_get_usage_params.rbs +9 -4
- data/sig/orb/models/metric_fetch_params.rbs +12 -3
- data/sig/orb/models/metric_update_params.rbs +5 -1
- data/sig/orb/models/mutated_subscription.rbs +124 -0
- data/sig/orb/models/new_allocation_price.rbs +5 -0
- data/sig/orb/models/new_floating_bulk_price.rbs +4 -4
- data/sig/orb/models/new_floating_bulk_with_proration_price.rbs +4 -4
- data/sig/orb/models/new_floating_cumulative_grouped_bulk_price.rbs +4 -4
- data/sig/orb/models/new_floating_grouped_allocation_price.rbs +4 -4
- data/sig/orb/models/new_floating_grouped_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_floating_grouped_tiered_price.rbs +4 -4
- data/sig/orb/models/new_floating_grouped_with_metered_minimum_price.rbs +4 -4
- data/sig/orb/models/new_floating_grouped_with_prorated_minimum_price.rbs +4 -4
- data/sig/orb/models/new_floating_matrix_price.rbs +4 -4
- data/sig/orb/models/new_floating_matrix_with_allocation_price.rbs +4 -4
- data/sig/orb/models/new_floating_matrix_with_display_name_price.rbs +4 -4
- data/sig/orb/models/new_floating_max_group_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_floating_minimum_composite_price.rbs +4 -4
- data/sig/orb/models/new_floating_package_price.rbs +4 -4
- data/sig/orb/models/new_floating_package_with_allocation_price.rbs +4 -4
- data/sig/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
- data/sig/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rbs +4 -4
- data/sig/orb/models/new_floating_threshold_total_amount_price.rbs +4 -4
- data/sig/orb/models/new_floating_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_floating_tiered_package_with_minimum_price.rbs +4 -4
- data/sig/orb/models/new_floating_tiered_price.rbs +4 -4
- data/sig/orb/models/new_floating_tiered_with_minimum_price.rbs +4 -4
- data/sig/orb/models/new_floating_tiered_with_proration_price.rbs +4 -4
- data/sig/orb/models/new_floating_unit_price.rbs +4 -4
- data/sig/orb/models/new_floating_unit_with_percent_price.rbs +4 -4
- data/sig/orb/models/new_floating_unit_with_proration_price.rbs +4 -4
- data/sig/orb/models/new_plan_bulk_price.rbs +4 -4
- data/sig/orb/models/new_plan_bulk_with_proration_price.rbs +4 -4
- data/sig/orb/models/new_plan_cumulative_grouped_bulk_price.rbs +4 -4
- data/sig/orb/models/new_plan_grouped_allocation_price.rbs +4 -4
- data/sig/orb/models/new_plan_grouped_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_plan_grouped_tiered_price.rbs +4 -4
- data/sig/orb/models/new_plan_grouped_with_metered_minimum_price.rbs +4 -4
- data/sig/orb/models/new_plan_grouped_with_prorated_minimum_price.rbs +4 -4
- data/sig/orb/models/new_plan_matrix_price.rbs +4 -4
- data/sig/orb/models/new_plan_matrix_with_allocation_price.rbs +4 -4
- data/sig/orb/models/new_plan_matrix_with_display_name_price.rbs +4 -4
- data/sig/orb/models/new_plan_max_group_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_plan_minimum_composite_price.rbs +4 -4
- data/sig/orb/models/new_plan_package_price.rbs +4 -4
- data/sig/orb/models/new_plan_package_with_allocation_price.rbs +4 -4
- data/sig/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
- data/sig/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rbs +4 -4
- data/sig/orb/models/new_plan_threshold_total_amount_price.rbs +4 -4
- data/sig/orb/models/new_plan_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_plan_tiered_package_with_minimum_price.rbs +4 -4
- data/sig/orb/models/new_plan_tiered_price.rbs +4 -4
- data/sig/orb/models/new_plan_tiered_with_minimum_price.rbs +4 -4
- data/sig/orb/models/new_plan_unit_price.rbs +4 -4
- data/sig/orb/models/new_plan_unit_with_percent_price.rbs +4 -4
- data/sig/orb/models/new_plan_unit_with_proration_price.rbs +4 -4
- data/sig/orb/models/new_subscription_bulk_price.rbs +4 -4
- data/sig/orb/models/new_subscription_bulk_with_proration_price.rbs +4 -4
- data/sig/orb/models/new_subscription_cumulative_grouped_bulk_price.rbs +4 -4
- data/sig/orb/models/new_subscription_grouped_allocation_price.rbs +4 -4
- data/sig/orb/models/new_subscription_grouped_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_subscription_grouped_tiered_price.rbs +4 -4
- data/sig/orb/models/new_subscription_grouped_with_metered_minimum_price.rbs +4 -4
- data/sig/orb/models/new_subscription_grouped_with_prorated_minimum_price.rbs +4 -4
- data/sig/orb/models/new_subscription_matrix_price.rbs +4 -4
- data/sig/orb/models/new_subscription_matrix_with_allocation_price.rbs +4 -4
- data/sig/orb/models/new_subscription_matrix_with_display_name_price.rbs +4 -4
- data/sig/orb/models/new_subscription_max_group_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_subscription_minimum_composite_price.rbs +4 -4
- data/sig/orb/models/new_subscription_package_price.rbs +4 -4
- data/sig/orb/models/new_subscription_package_with_allocation_price.rbs +4 -4
- data/sig/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
- data/sig/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rbs +4 -4
- data/sig/orb/models/new_subscription_threshold_total_amount_price.rbs +4 -4
- data/sig/orb/models/new_subscription_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_subscription_tiered_package_with_minimum_price.rbs +4 -4
- data/sig/orb/models/new_subscription_tiered_price.rbs +4 -4
- data/sig/orb/models/new_subscription_tiered_with_minimum_price.rbs +4 -4
- data/sig/orb/models/new_subscription_unit_price.rbs +4 -4
- data/sig/orb/models/new_subscription_unit_with_percent_price.rbs +4 -4
- data/sig/orb/models/new_subscription_unit_with_proration_price.rbs +4 -4
- data/sig/orb/models/plan.rbs +134 -0
- data/sig/orb/models/plan_create_params.rbs +1030 -72
- data/sig/orb/models/plan_fetch_params.rbs +9 -3
- data/sig/orb/models/plan_update_params.rbs +14 -1
- data/sig/orb/models/plan_version.rbs +134 -0
- data/sig/orb/models/plans/external_plan_id_fetch_params.rbs +11 -3
- data/sig/orb/models/plans/external_plan_id_update_params.rbs +14 -1
- data/sig/orb/models/plans/migration_cancel_params.rbs +6 -1
- data/sig/orb/models/plans/migration_list_params.rbs +5 -1
- data/sig/orb/models/plans/migration_retrieve_params.rbs +6 -1
- data/sig/orb/models/price.rbs +2361 -1156
- data/sig/orb/models/price_create_params.rbs +1124 -931
- data/sig/orb/models/price_evaluate_multiple_params.rbs +626 -23
- data/sig/orb/models/price_evaluate_params.rbs +5 -0
- data/sig/orb/models/price_evaluate_preview_events_params.rbs +626 -23
- data/sig/orb/models/price_fetch_params.rbs +9 -3
- data/sig/orb/models/price_update_params.rbs +5 -1
- data/sig/orb/models/prices/external_price_id_fetch_params.rbs +11 -3
- data/sig/orb/models/prices/external_price_id_update_params.rbs +5 -1
- data/sig/orb/models/subscription.rbs +124 -0
- data/sig/orb/models/subscription_cancel_params.rbs +5 -0
- data/sig/orb/models/subscription_change_apply_params.rbs +5 -0
- data/sig/orb/models/subscription_change_cancel_params.rbs +12 -3
- data/sig/orb/models/subscription_change_retrieve_params.rbs +12 -3
- data/sig/orb/models/subscription_create_params.rbs +2009 -430
- data/sig/orb/models/subscription_fetch_costs_params.rbs +5 -0
- data/sig/orb/models/subscription_fetch_params.rbs +11 -3
- data/sig/orb/models/subscription_fetch_schedule_params.rbs +5 -0
- data/sig/orb/models/subscription_fetch_usage_params.rbs +5 -0
- data/sig/orb/models/subscription_price_intervals_params.rbs +800 -23
- data/sig/orb/models/subscription_redeem_coupon_params.rbs +5 -0
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +2014 -430
- data/sig/orb/models/subscription_trigger_phase_params.rbs +9 -1
- data/sig/orb/models/subscription_unschedule_cancellation_params.rbs +11 -3
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs +10 -2
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs +11 -3
- data/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs +5 -0
- data/sig/orb/models/subscription_update_params.rbs +10 -0
- data/sig/orb/models/subscription_update_trial_params.rbs +5 -0
- data/sig/orb/models.rbs +2 -0
- data/sig/orb/resources/alerts.rbs +6 -0
- data/sig/orb/resources/customers/credits/ledger.rbs +2 -26
- data/sig/orb/resources/customers.rbs +2 -0
- data/sig/orb/resources/invoices.rbs +1 -0
- data/sig/orb/resources/licenses/external_licenses.rbs +1 -1
- data/sig/orb/resources/licenses/usage.rbs +2 -2
- data/sig/orb/resources/plans/external_plan_id.rbs +1 -0
- data/sig/orb/resources/plans.rbs +2 -0
- data/sig/orb/resources/prices.rbs +1 -48
- data/sig/orb/resources/subscriptions.rbs +3 -0
- metadata +6 -7
|
@@ -43,6 +43,12 @@ module Orb
|
|
|
43
43
|
# @return [String, nil]
|
|
44
44
|
optional :default_invoice_memo, String, nil?: true
|
|
45
45
|
|
|
46
|
+
# @!attribute description
|
|
47
|
+
# An optional user-defined description of the plan.
|
|
48
|
+
#
|
|
49
|
+
# @return [String, nil]
|
|
50
|
+
optional :description, String, nil?: true
|
|
51
|
+
|
|
46
52
|
# @!attribute external_plan_id
|
|
47
53
|
#
|
|
48
54
|
# @return [String, nil]
|
|
@@ -78,7 +84,7 @@ module Orb
|
|
|
78
84
|
# @return [Symbol, Orb::Models::PlanCreateParams::Status, nil]
|
|
79
85
|
optional :status, enum: -> { Orb::PlanCreateParams::Status }
|
|
80
86
|
|
|
81
|
-
# @!method initialize(currency:, name:, prices:, adjustments: nil, default_invoice_memo: nil, external_plan_id: nil, metadata: nil, net_terms: nil, plan_phases: nil, status: nil, request_options: {})
|
|
87
|
+
# @!method initialize(currency:, name:, prices:, adjustments: nil, default_invoice_memo: nil, description: nil, external_plan_id: nil, metadata: nil, net_terms: nil, plan_phases: nil, status: nil, request_options: {})
|
|
82
88
|
# Some parameter documentations has been truncated, see
|
|
83
89
|
# {Orb::Models::PlanCreateParams} for more details.
|
|
84
90
|
#
|
|
@@ -92,6 +98,8 @@ module Orb
|
|
|
92
98
|
#
|
|
93
99
|
# @param default_invoice_memo [String, nil] Free-form text which is available on the invoice PDF and the Orb invoice portal.
|
|
94
100
|
#
|
|
101
|
+
# @param description [String, nil] An optional user-defined description of the plan.
|
|
102
|
+
#
|
|
95
103
|
# @param external_plan_id [String, nil]
|
|
96
104
|
#
|
|
97
105
|
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
|
@@ -111,6 +119,14 @@ module Orb
|
|
|
111
119
|
# @return [Orb::Models::NewAllocationPrice, nil]
|
|
112
120
|
optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true
|
|
113
121
|
|
|
122
|
+
# @!attribute license_allocation_price
|
|
123
|
+
# The license allocation price to add to the plan.
|
|
124
|
+
#
|
|
125
|
+
# @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice, nil]
|
|
126
|
+
optional :license_allocation_price,
|
|
127
|
+
-> { Orb::PlanCreateParams::Price::LicenseAllocationPrice },
|
|
128
|
+
nil?: true
|
|
129
|
+
|
|
114
130
|
# @!attribute plan_phase_order
|
|
115
131
|
# The phase to add this price to.
|
|
116
132
|
#
|
|
@@ -120,15 +136,254 @@ module Orb
|
|
|
120
136
|
# @!attribute price
|
|
121
137
|
# New plan price request body params.
|
|
122
138
|
#
|
|
123
|
-
# @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil]
|
|
139
|
+
# @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil]
|
|
124
140
|
optional :price, union: -> { Orb::PlanCreateParams::Price::Price }, nil?: true
|
|
125
141
|
|
|
126
|
-
# @!method initialize(allocation_price: nil, plan_phase_order: nil, price: nil)
|
|
142
|
+
# @!method initialize(allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil)
|
|
127
143
|
# @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan.
|
|
128
144
|
#
|
|
145
|
+
# @param license_allocation_price [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice, nil] The license allocation price to add to the plan.
|
|
146
|
+
#
|
|
129
147
|
# @param plan_phase_order [Integer, nil] The phase to add this price to.
|
|
130
148
|
#
|
|
131
|
-
# @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil] New plan price request body params.
|
|
149
|
+
# @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil] New plan price request body params.
|
|
150
|
+
|
|
151
|
+
# @see Orb::Models::PlanCreateParams::Price#license_allocation_price
|
|
152
|
+
class LicenseAllocationPrice < Orb::Internal::Type::BaseModel
|
|
153
|
+
# @!attribute cadence
|
|
154
|
+
# The cadence to bill for this price on.
|
|
155
|
+
#
|
|
156
|
+
# @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Cadence]
|
|
157
|
+
required :cadence, enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence }
|
|
158
|
+
|
|
159
|
+
# @!attribute item_id
|
|
160
|
+
# The id of the item the price will be associated with.
|
|
161
|
+
#
|
|
162
|
+
# @return [String]
|
|
163
|
+
required :item_id, String
|
|
164
|
+
|
|
165
|
+
# @!attribute license_allocations
|
|
166
|
+
# License allocations to associate with this price. Each entry defines a
|
|
167
|
+
# per-license credit pool granted each cadence. Requires license_type_id or
|
|
168
|
+
# license_type_configuration to be set.
|
|
169
|
+
#
|
|
170
|
+
# @return [Array<Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation>]
|
|
171
|
+
required :license_allocations,
|
|
172
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation] }
|
|
173
|
+
|
|
174
|
+
# @!attribute model_type
|
|
175
|
+
# The pricing model type
|
|
176
|
+
#
|
|
177
|
+
# @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ModelType]
|
|
178
|
+
required :model_type, enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType }
|
|
179
|
+
|
|
180
|
+
# @!attribute name
|
|
181
|
+
# The name of the price.
|
|
182
|
+
#
|
|
183
|
+
# @return [String]
|
|
184
|
+
required :name, String
|
|
185
|
+
|
|
186
|
+
# @!attribute unit_config
|
|
187
|
+
# Configuration for unit pricing
|
|
188
|
+
#
|
|
189
|
+
# @return [Orb::Models::UnitConfig]
|
|
190
|
+
required :unit_config, -> { Orb::UnitConfig }
|
|
191
|
+
|
|
192
|
+
# @!attribute billable_metric_id
|
|
193
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
194
|
+
# usage-based.
|
|
195
|
+
#
|
|
196
|
+
# @return [String, nil]
|
|
197
|
+
optional :billable_metric_id, String, nil?: true
|
|
198
|
+
|
|
199
|
+
# @!attribute billed_in_advance
|
|
200
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
201
|
+
# this is true, and in-arrears if this is false.
|
|
202
|
+
#
|
|
203
|
+
# @return [Boolean, nil]
|
|
204
|
+
optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
|
|
205
|
+
|
|
206
|
+
# @!attribute billing_cycle_configuration
|
|
207
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
208
|
+
# months.
|
|
209
|
+
#
|
|
210
|
+
# @return [Orb::Models::NewBillingCycleConfiguration, nil]
|
|
211
|
+
optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
|
|
212
|
+
|
|
213
|
+
# @!attribute conversion_rate
|
|
214
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
215
|
+
#
|
|
216
|
+
# @return [Float, nil]
|
|
217
|
+
optional :conversion_rate, Float, nil?: true
|
|
218
|
+
|
|
219
|
+
# @!attribute conversion_rate_config
|
|
220
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
221
|
+
#
|
|
222
|
+
# @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
|
|
223
|
+
optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
|
|
224
|
+
|
|
225
|
+
# @!attribute currency
|
|
226
|
+
# An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
227
|
+
# price is billed.
|
|
228
|
+
#
|
|
229
|
+
# @return [String, nil]
|
|
230
|
+
optional :currency, String, nil?: true
|
|
231
|
+
|
|
232
|
+
# @!attribute dimensional_price_configuration
|
|
233
|
+
# For dimensional price: specifies a price group and dimension values
|
|
234
|
+
#
|
|
235
|
+
# @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
|
|
236
|
+
optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true
|
|
237
|
+
|
|
238
|
+
# @!attribute external_price_id
|
|
239
|
+
# An alias for the price.
|
|
240
|
+
#
|
|
241
|
+
# @return [String, nil]
|
|
242
|
+
optional :external_price_id, String, nil?: true
|
|
243
|
+
|
|
244
|
+
# @!attribute fixed_price_quantity
|
|
245
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
246
|
+
# applied.
|
|
247
|
+
#
|
|
248
|
+
# @return [Float, nil]
|
|
249
|
+
optional :fixed_price_quantity, Float, nil?: true
|
|
250
|
+
|
|
251
|
+
# @!attribute invoice_grouping_key
|
|
252
|
+
# The property used to group this price on an invoice
|
|
253
|
+
#
|
|
254
|
+
# @return [String, nil]
|
|
255
|
+
optional :invoice_grouping_key, String, nil?: true
|
|
256
|
+
|
|
257
|
+
# @!attribute invoicing_cycle_configuration
|
|
258
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
259
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
260
|
+
#
|
|
261
|
+
# @return [Orb::Models::NewBillingCycleConfiguration, nil]
|
|
262
|
+
optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
|
|
263
|
+
|
|
264
|
+
# @!attribute license_type_id
|
|
265
|
+
# The ID of the license type to associate with this price.
|
|
266
|
+
#
|
|
267
|
+
# @return [String, nil]
|
|
268
|
+
optional :license_type_id, String, nil?: true
|
|
269
|
+
|
|
270
|
+
# @!attribute metadata
|
|
271
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
272
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
273
|
+
# by setting `metadata` to `null`.
|
|
274
|
+
#
|
|
275
|
+
# @return [Hash{Symbol=>String, nil}, nil]
|
|
276
|
+
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
|
277
|
+
|
|
278
|
+
# @!attribute reference_id
|
|
279
|
+
# A transient ID that can be used to reference this price when adding adjustments
|
|
280
|
+
# in the same API call.
|
|
281
|
+
#
|
|
282
|
+
# @return [String, nil]
|
|
283
|
+
optional :reference_id, String, nil?: true
|
|
284
|
+
|
|
285
|
+
# @!method initialize(cadence:, item_id:, license_allocations:, model_type:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil)
|
|
286
|
+
# Some parameter documentations has been truncated, see
|
|
287
|
+
# {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice} for more details.
|
|
288
|
+
#
|
|
289
|
+
# The license allocation price to add to the plan.
|
|
290
|
+
#
|
|
291
|
+
# @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Cadence] The cadence to bill for this price on.
|
|
292
|
+
#
|
|
293
|
+
# @param item_id [String] The id of the item the price will be associated with.
|
|
294
|
+
#
|
|
295
|
+
# @param license_allocations [Array<Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation>] License allocations to associate with this price. Each entry defines a per-licen
|
|
296
|
+
#
|
|
297
|
+
# @param model_type [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ModelType] The pricing model type
|
|
298
|
+
#
|
|
299
|
+
# @param name [String] The name of the price.
|
|
300
|
+
#
|
|
301
|
+
# @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing
|
|
302
|
+
#
|
|
303
|
+
# @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
|
|
304
|
+
#
|
|
305
|
+
# @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
|
|
306
|
+
#
|
|
307
|
+
# @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
|
|
308
|
+
#
|
|
309
|
+
# @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
|
|
310
|
+
#
|
|
311
|
+
# @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
|
|
312
|
+
#
|
|
313
|
+
# @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr
|
|
314
|
+
#
|
|
315
|
+
# @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
|
|
316
|
+
#
|
|
317
|
+
# @param external_price_id [String, nil] An alias for the price.
|
|
318
|
+
#
|
|
319
|
+
# @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
|
|
320
|
+
#
|
|
321
|
+
# @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
|
|
322
|
+
#
|
|
323
|
+
# @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
324
|
+
#
|
|
325
|
+
# @param license_type_id [String, nil] The ID of the license type to associate with this price.
|
|
326
|
+
#
|
|
327
|
+
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
|
328
|
+
#
|
|
329
|
+
# @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
|
|
330
|
+
|
|
331
|
+
# The cadence to bill for this price on.
|
|
332
|
+
#
|
|
333
|
+
# @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice#cadence
|
|
334
|
+
module Cadence
|
|
335
|
+
extend Orb::Internal::Type::Enum
|
|
336
|
+
|
|
337
|
+
ANNUAL = :annual
|
|
338
|
+
SEMI_ANNUAL = :semi_annual
|
|
339
|
+
MONTHLY = :monthly
|
|
340
|
+
QUARTERLY = :quarterly
|
|
341
|
+
ONE_TIME = :one_time
|
|
342
|
+
CUSTOM = :custom
|
|
343
|
+
|
|
344
|
+
# @!method self.values
|
|
345
|
+
# @return [Array<Symbol>]
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
class LicenseAllocation < Orb::Internal::Type::BaseModel
|
|
349
|
+
# @!attribute amount
|
|
350
|
+
# The amount of credits granted per active license per cadence.
|
|
351
|
+
#
|
|
352
|
+
# @return [String]
|
|
353
|
+
required :amount, String
|
|
354
|
+
|
|
355
|
+
# @!attribute currency
|
|
356
|
+
# The currency of the license allocation.
|
|
357
|
+
#
|
|
358
|
+
# @return [String]
|
|
359
|
+
required :currency, String
|
|
360
|
+
|
|
361
|
+
# @!attribute write_off_overage
|
|
362
|
+
# When True, overage beyond the allocation is written off.
|
|
363
|
+
#
|
|
364
|
+
# @return [Boolean, nil]
|
|
365
|
+
optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true
|
|
366
|
+
|
|
367
|
+
# @!method initialize(amount:, currency:, write_off_overage: nil)
|
|
368
|
+
# @param amount [String] The amount of credits granted per active license per cadence.
|
|
369
|
+
#
|
|
370
|
+
# @param currency [String] The currency of the license allocation.
|
|
371
|
+
#
|
|
372
|
+
# @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off.
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
# The pricing model type
|
|
376
|
+
#
|
|
377
|
+
# @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice#model_type
|
|
378
|
+
module ModelType
|
|
379
|
+
extend Orb::Internal::Type::Enum
|
|
380
|
+
|
|
381
|
+
UNIT = :unit
|
|
382
|
+
|
|
383
|
+
# @!method self.values
|
|
384
|
+
# @return [Array<Symbol>]
|
|
385
|
+
end
|
|
386
|
+
end
|
|
132
387
|
|
|
133
388
|
# New plan price request body params.
|
|
134
389
|
#
|
|
@@ -166,6 +421,9 @@ module Orb
|
|
|
166
421
|
|
|
167
422
|
variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice }
|
|
168
423
|
|
|
424
|
+
variant :matrix_with_threshold_discounts,
|
|
425
|
+
-> { Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts }
|
|
426
|
+
|
|
169
427
|
variant :tiered_with_proration, -> { Orb::PlanCreateParams::Price::Price::TieredWithProration }
|
|
170
428
|
|
|
171
429
|
variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice }
|
|
@@ -196,6 +454,10 @@ module Orb
|
|
|
196
454
|
variant :cumulative_grouped_allocation,
|
|
197
455
|
-> { Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation }
|
|
198
456
|
|
|
457
|
+
variant :daily_credit_allowance, -> { Orb::PlanCreateParams::Price::Price::DailyCreditAllowance }
|
|
458
|
+
|
|
459
|
+
variant :metered_allowance, -> { Orb::PlanCreateParams::Price::Price::MeteredAllowance }
|
|
460
|
+
|
|
199
461
|
variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice }
|
|
200
462
|
|
|
201
463
|
variant :percent, -> { Orb::PlanCreateParams::Price::Price::Percent }
|
|
@@ -265,9 +527,7 @@ module Orb
|
|
|
265
527
|
# The configuration for the rate of the price currency to the invoicing currency.
|
|
266
528
|
#
|
|
267
529
|
# @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
|
|
268
|
-
optional :conversion_rate_config,
|
|
269
|
-
union: -> { Orb::PlanCreateParams::Price::Price::BulkWithFilters::ConversionRateConfig },
|
|
270
|
-
nil?: true
|
|
530
|
+
optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
|
|
271
531
|
|
|
272
532
|
# @!attribute currency
|
|
273
533
|
# An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
@@ -459,12 +719,12 @@ module Orb
|
|
|
459
719
|
end
|
|
460
720
|
end
|
|
461
721
|
|
|
462
|
-
class
|
|
722
|
+
class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel
|
|
463
723
|
# @!attribute cadence
|
|
464
724
|
# The cadence to bill for this price on.
|
|
465
725
|
#
|
|
466
|
-
# @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::
|
|
467
|
-
required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::
|
|
726
|
+
# @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence]
|
|
727
|
+
required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence }
|
|
468
728
|
|
|
469
729
|
# @!attribute item_id
|
|
470
730
|
# The id of the item the price will be associated with.
|
|
@@ -472,11 +732,18 @@ module Orb
|
|
|
472
732
|
# @return [String]
|
|
473
733
|
required :item_id, String
|
|
474
734
|
|
|
735
|
+
# @!attribute matrix_with_threshold_discounts_config
|
|
736
|
+
# Configuration for matrix_with_threshold_discounts pricing
|
|
737
|
+
#
|
|
738
|
+
# @return [Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig]
|
|
739
|
+
required :matrix_with_threshold_discounts_config,
|
|
740
|
+
-> { Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig }
|
|
741
|
+
|
|
475
742
|
# @!attribute model_type
|
|
476
743
|
# The pricing model type
|
|
477
744
|
#
|
|
478
|
-
# @return [Symbol, :
|
|
479
|
-
required :model_type, const: :
|
|
745
|
+
# @return [Symbol, :matrix_with_threshold_discounts]
|
|
746
|
+
required :model_type, const: :matrix_with_threshold_discounts
|
|
480
747
|
|
|
481
748
|
# @!attribute name
|
|
482
749
|
# The name of the price.
|
|
@@ -484,13 +751,6 @@ module Orb
|
|
|
484
751
|
# @return [String]
|
|
485
752
|
required :name, String
|
|
486
753
|
|
|
487
|
-
# @!attribute tiered_with_proration_config
|
|
488
|
-
# Configuration for tiered_with_proration pricing
|
|
489
|
-
#
|
|
490
|
-
# @return [Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig]
|
|
491
|
-
required :tiered_with_proration_config,
|
|
492
|
-
-> { Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig }
|
|
493
|
-
|
|
494
754
|
# @!attribute billable_metric_id
|
|
495
755
|
# The id of the billable metric for the price. Only needed if the price is
|
|
496
756
|
# usage-based.
|
|
@@ -522,11 +782,7 @@ module Orb
|
|
|
522
782
|
# The configuration for the rate of the price currency to the invoicing currency.
|
|
523
783
|
#
|
|
524
784
|
# @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
|
|
525
|
-
optional :conversion_rate_config,
|
|
526
|
-
union: -> {
|
|
527
|
-
Orb::PlanCreateParams::Price::Price::TieredWithProration::ConversionRateConfig
|
|
528
|
-
},
|
|
529
|
-
nil?: true
|
|
785
|
+
optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
|
|
530
786
|
|
|
531
787
|
# @!attribute currency
|
|
532
788
|
# An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
@@ -592,18 +848,18 @@ module Orb
|
|
|
592
848
|
# @return [String, nil]
|
|
593
849
|
optional :reference_id, String, nil?: true
|
|
594
850
|
|
|
595
|
-
# @!method initialize(cadence:, item_id:,
|
|
851
|
+
# @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts)
|
|
596
852
|
# Some parameter documentations has been truncated, see
|
|
597
|
-
# {Orb::Models::PlanCreateParams::Price::Price::
|
|
598
|
-
# details.
|
|
853
|
+
# {Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts} for
|
|
854
|
+
# more details.
|
|
599
855
|
#
|
|
600
|
-
# @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::
|
|
856
|
+
# @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on.
|
|
601
857
|
#
|
|
602
858
|
# @param item_id [String] The id of the item the price will be associated with.
|
|
603
859
|
#
|
|
604
|
-
# @param
|
|
860
|
+
# @param matrix_with_threshold_discounts_config [Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing
|
|
605
861
|
#
|
|
606
|
-
# @param
|
|
862
|
+
# @param name [String] The name of the price.
|
|
607
863
|
#
|
|
608
864
|
# @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
|
|
609
865
|
#
|
|
@@ -633,11 +889,11 @@ module Orb
|
|
|
633
889
|
#
|
|
634
890
|
# @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
|
|
635
891
|
#
|
|
636
|
-
# @param model_type [Symbol, :
|
|
892
|
+
# @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type
|
|
637
893
|
|
|
638
894
|
# The cadence to bill for this price on.
|
|
639
895
|
#
|
|
640
|
-
# @see Orb::Models::PlanCreateParams::Price::Price::
|
|
896
|
+
# @see Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts#cadence
|
|
641
897
|
module Cadence
|
|
642
898
|
extend Orb::Internal::Type::Enum
|
|
643
899
|
|
|
@@ -652,61 +908,138 @@ module Orb
|
|
|
652
908
|
# @return [Array<Symbol>]
|
|
653
909
|
end
|
|
654
910
|
|
|
655
|
-
# @see Orb::Models::PlanCreateParams::Price::Price::
|
|
656
|
-
class
|
|
657
|
-
# @!attribute
|
|
658
|
-
#
|
|
659
|
-
# proration
|
|
911
|
+
# @see Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config
|
|
912
|
+
class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel
|
|
913
|
+
# @!attribute default_unit_amount
|
|
914
|
+
# Unit price used for usage that does not match any defined matrix cell.
|
|
660
915
|
#
|
|
661
|
-
# @return [
|
|
662
|
-
required :
|
|
663
|
-
-> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier] }
|
|
916
|
+
# @return [String]
|
|
917
|
+
required :default_unit_amount, String
|
|
664
918
|
|
|
665
|
-
# @!
|
|
666
|
-
#
|
|
667
|
-
# {Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig}
|
|
668
|
-
# for more details.
|
|
919
|
+
# @!attribute first_dimension
|
|
920
|
+
# First matrix dimension key.
|
|
669
921
|
#
|
|
670
|
-
#
|
|
922
|
+
# @return [String]
|
|
923
|
+
required :first_dimension, String
|
|
924
|
+
|
|
925
|
+
# @!attribute matrix_values
|
|
926
|
+
# Per-cell unit prices.
|
|
671
927
|
#
|
|
672
|
-
# @
|
|
928
|
+
# @return [Array<Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue>]
|
|
929
|
+
required :matrix_values,
|
|
930
|
+
-> do
|
|
931
|
+
Orb::Internal::Type::ArrayOf[
|
|
932
|
+
Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue
|
|
933
|
+
]
|
|
934
|
+
end
|
|
935
|
+
|
|
936
|
+
# @!attribute second_dimension
|
|
937
|
+
# Optional second matrix dimension key.
|
|
938
|
+
#
|
|
939
|
+
# @return [String, nil]
|
|
940
|
+
optional :second_dimension, String, nil?: true
|
|
673
941
|
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
942
|
+
# @!attribute threshold_discount_groups
|
|
943
|
+
#
|
|
944
|
+
# @return [Array<Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup>, nil]
|
|
945
|
+
optional :threshold_discount_groups,
|
|
946
|
+
-> do
|
|
947
|
+
Orb::Internal::Type::ArrayOf[
|
|
948
|
+
Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup
|
|
949
|
+
]
|
|
950
|
+
end
|
|
951
|
+
|
|
952
|
+
# @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil)
|
|
953
|
+
# Configuration for matrix_with_threshold_discounts pricing
|
|
954
|
+
#
|
|
955
|
+
# @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell.
|
|
956
|
+
#
|
|
957
|
+
# @param first_dimension [String] First matrix dimension key.
|
|
958
|
+
#
|
|
959
|
+
# @param matrix_values [Array<Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue>] Per-cell unit prices.
|
|
960
|
+
#
|
|
961
|
+
# @param second_dimension [String, nil] Optional second matrix dimension key.
|
|
962
|
+
#
|
|
963
|
+
# @param threshold_discount_groups [Array<Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup>]
|
|
964
|
+
|
|
965
|
+
class MatrixValue < Orb::Internal::Type::BaseModel
|
|
966
|
+
# @!attribute first_dimension_value
|
|
677
967
|
#
|
|
678
968
|
# @return [String]
|
|
679
|
-
required :
|
|
969
|
+
required :first_dimension_value, String
|
|
680
970
|
|
|
681
971
|
# @!attribute unit_amount
|
|
682
|
-
# Amount per unit
|
|
683
972
|
#
|
|
684
973
|
# @return [String]
|
|
685
974
|
required :unit_amount, String
|
|
686
975
|
|
|
687
|
-
# @!
|
|
688
|
-
# Configuration for a single tiered with proration tier
|
|
976
|
+
# @!attribute second_dimension_value
|
|
689
977
|
#
|
|
690
|
-
# @
|
|
978
|
+
# @return [String, nil]
|
|
979
|
+
optional :second_dimension_value, String, nil?: true
|
|
980
|
+
|
|
981
|
+
# @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil)
|
|
982
|
+
# @param first_dimension_value [String]
|
|
983
|
+
# @param unit_amount [String]
|
|
984
|
+
# @param second_dimension_value [String, nil]
|
|
985
|
+
end
|
|
986
|
+
|
|
987
|
+
class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel
|
|
988
|
+
# @!attribute above_threshold_discount_percentage
|
|
989
|
+
# Discount rate applied to spend above the threshold.
|
|
691
990
|
#
|
|
692
|
-
# @
|
|
991
|
+
# @return [String]
|
|
992
|
+
required :above_threshold_discount_percentage, String
|
|
993
|
+
|
|
994
|
+
# @!attribute below_threshold_discount_percentage
|
|
995
|
+
# Discount rate applied to spend at or below the threshold. Set to 0 for no
|
|
996
|
+
# baseline discount.
|
|
997
|
+
#
|
|
998
|
+
# @return [String]
|
|
999
|
+
required :below_threshold_discount_percentage, String
|
|
1000
|
+
|
|
1001
|
+
# @!attribute cell_coordinates
|
|
1002
|
+
# Semicolon-separated list of matrix cell coordinates targeted by this group. Each
|
|
1003
|
+
# coordinate is `first,second` when the matrix has two dimensions, or just `first`
|
|
1004
|
+
# for a single-dimension matrix. Example: `blue,circle;green,triangle`.
|
|
1005
|
+
#
|
|
1006
|
+
# @return [String]
|
|
1007
|
+
required :cell_coordinates, String
|
|
1008
|
+
|
|
1009
|
+
# @!attribute threshold_amount
|
|
1010
|
+
#
|
|
1011
|
+
# @return [String]
|
|
1012
|
+
required :threshold_amount, String
|
|
1013
|
+
|
|
1014
|
+
# @!attribute description
|
|
1015
|
+
#
|
|
1016
|
+
# @return [String, nil]
|
|
1017
|
+
optional :description, String, nil?: true
|
|
1018
|
+
|
|
1019
|
+
# @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil)
|
|
1020
|
+
# Some parameter documentations has been truncated, see
|
|
1021
|
+
# {Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup}
|
|
1022
|
+
# for more details.
|
|
1023
|
+
#
|
|
1024
|
+
# @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold.
|
|
1025
|
+
#
|
|
1026
|
+
# @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli
|
|
1027
|
+
#
|
|
1028
|
+
# @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each
|
|
1029
|
+
#
|
|
1030
|
+
# @param threshold_amount [String]
|
|
1031
|
+
#
|
|
1032
|
+
# @param description [String, nil]
|
|
693
1033
|
end
|
|
694
1034
|
end
|
|
695
1035
|
end
|
|
696
1036
|
|
|
697
|
-
class
|
|
1037
|
+
class TieredWithProration < Orb::Internal::Type::BaseModel
|
|
698
1038
|
# @!attribute cadence
|
|
699
1039
|
# The cadence to bill for this price on.
|
|
700
1040
|
#
|
|
701
|
-
# @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::
|
|
702
|
-
required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::
|
|
703
|
-
|
|
704
|
-
# @!attribute grouped_with_min_max_thresholds_config
|
|
705
|
-
# Configuration for grouped_with_min_max_thresholds pricing
|
|
706
|
-
#
|
|
707
|
-
# @return [Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig]
|
|
708
|
-
required :grouped_with_min_max_thresholds_config,
|
|
709
|
-
-> { Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig }
|
|
1041
|
+
# @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::Cadence]
|
|
1042
|
+
required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence }
|
|
710
1043
|
|
|
711
1044
|
# @!attribute item_id
|
|
712
1045
|
# The id of the item the price will be associated with.
|
|
@@ -717,8 +1050,8 @@ module Orb
|
|
|
717
1050
|
# @!attribute model_type
|
|
718
1051
|
# The pricing model type
|
|
719
1052
|
#
|
|
720
|
-
# @return [Symbol, :
|
|
721
|
-
required :model_type, const: :
|
|
1053
|
+
# @return [Symbol, :tiered_with_proration]
|
|
1054
|
+
required :model_type, const: :tiered_with_proration
|
|
722
1055
|
|
|
723
1056
|
# @!attribute name
|
|
724
1057
|
# The name of the price.
|
|
@@ -726,6 +1059,13 @@ module Orb
|
|
|
726
1059
|
# @return [String]
|
|
727
1060
|
required :name, String
|
|
728
1061
|
|
|
1062
|
+
# @!attribute tiered_with_proration_config
|
|
1063
|
+
# Configuration for tiered_with_proration pricing
|
|
1064
|
+
#
|
|
1065
|
+
# @return [Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig]
|
|
1066
|
+
required :tiered_with_proration_config,
|
|
1067
|
+
-> { Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig }
|
|
1068
|
+
|
|
729
1069
|
# @!attribute billable_metric_id
|
|
730
1070
|
# The id of the billable metric for the price. Only needed if the price is
|
|
731
1071
|
# usage-based.
|
|
@@ -757,11 +1097,7 @@ module Orb
|
|
|
757
1097
|
# The configuration for the rate of the price currency to the invoicing currency.
|
|
758
1098
|
#
|
|
759
1099
|
# @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
|
|
760
|
-
optional :conversion_rate_config,
|
|
761
|
-
union: -> {
|
|
762
|
-
Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::ConversionRateConfig
|
|
763
|
-
},
|
|
764
|
-
nil?: true
|
|
1100
|
+
optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
|
|
765
1101
|
|
|
766
1102
|
# @!attribute currency
|
|
767
1103
|
# An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
@@ -827,19 +1163,19 @@ module Orb
|
|
|
827
1163
|
# @return [String, nil]
|
|
828
1164
|
optional :reference_id, String, nil?: true
|
|
829
1165
|
|
|
830
|
-
# @!method initialize(cadence:,
|
|
1166
|
+
# @!method initialize(cadence:, item_id:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration)
|
|
831
1167
|
# Some parameter documentations has been truncated, see
|
|
832
|
-
# {Orb::Models::PlanCreateParams::Price::Price::
|
|
833
|
-
#
|
|
834
|
-
#
|
|
835
|
-
# @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on.
|
|
1168
|
+
# {Orb::Models::PlanCreateParams::Price::Price::TieredWithProration} for more
|
|
1169
|
+
# details.
|
|
836
1170
|
#
|
|
837
|
-
# @param
|
|
1171
|
+
# @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::Cadence] The cadence to bill for this price on.
|
|
838
1172
|
#
|
|
839
1173
|
# @param item_id [String] The id of the item the price will be associated with.
|
|
840
1174
|
#
|
|
841
1175
|
# @param name [String] The name of the price.
|
|
842
1176
|
#
|
|
1177
|
+
# @param tiered_with_proration_config [Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing
|
|
1178
|
+
#
|
|
843
1179
|
# @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
|
|
844
1180
|
#
|
|
845
1181
|
# @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
|
|
@@ -868,11 +1204,11 @@ module Orb
|
|
|
868
1204
|
#
|
|
869
1205
|
# @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
|
|
870
1206
|
#
|
|
871
|
-
# @param model_type [Symbol, :
|
|
1207
|
+
# @param model_type [Symbol, :tiered_with_proration] The pricing model type
|
|
872
1208
|
|
|
873
1209
|
# The cadence to bill for this price on.
|
|
874
1210
|
#
|
|
875
|
-
# @see Orb::Models::PlanCreateParams::Price::Price::
|
|
1211
|
+
# @see Orb::Models::PlanCreateParams::Price::Price::TieredWithProration#cadence
|
|
876
1212
|
module Cadence
|
|
877
1213
|
extend Orb::Internal::Type::Enum
|
|
878
1214
|
|
|
@@ -887,58 +1223,61 @@ module Orb
|
|
|
887
1223
|
# @return [Array<Symbol>]
|
|
888
1224
|
end
|
|
889
1225
|
|
|
890
|
-
# @see Orb::Models::PlanCreateParams::Price::Price::
|
|
891
|
-
class
|
|
892
|
-
# @!attribute
|
|
893
|
-
#
|
|
1226
|
+
# @see Orb::Models::PlanCreateParams::Price::Price::TieredWithProration#tiered_with_proration_config
|
|
1227
|
+
class TieredWithProrationConfig < Orb::Internal::Type::BaseModel
|
|
1228
|
+
# @!attribute tiers
|
|
1229
|
+
# Tiers for rating based on total usage quantities into the specified tier with
|
|
1230
|
+
# proration
|
|
894
1231
|
#
|
|
895
|
-
# @return [
|
|
896
|
-
required :
|
|
1232
|
+
# @return [Array<Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier>]
|
|
1233
|
+
required :tiers,
|
|
1234
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier] }
|
|
897
1235
|
|
|
898
|
-
# @!
|
|
899
|
-
#
|
|
1236
|
+
# @!method initialize(tiers:)
|
|
1237
|
+
# Some parameter documentations has been truncated, see
|
|
1238
|
+
# {Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig}
|
|
1239
|
+
# for more details.
|
|
900
1240
|
#
|
|
901
|
-
#
|
|
902
|
-
required :maximum_charge, String
|
|
903
|
-
|
|
904
|
-
# @!attribute minimum_charge
|
|
905
|
-
# The minimum amount to charge each group, regardless of usage
|
|
1241
|
+
# Configuration for tiered_with_proration pricing
|
|
906
1242
|
#
|
|
907
|
-
# @
|
|
908
|
-
required :minimum_charge, String
|
|
1243
|
+
# @param tiers [Array<Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier>] Tiers for rating based on total usage quantities into the specified tier with pr
|
|
909
1244
|
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
1245
|
+
class Tier < Orb::Internal::Type::BaseModel
|
|
1246
|
+
# @!attribute tier_lower_bound
|
|
1247
|
+
# Inclusive tier starting value
|
|
1248
|
+
#
|
|
1249
|
+
# @return [String]
|
|
1250
|
+
required :tier_lower_bound, String
|
|
915
1251
|
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
1252
|
+
# @!attribute unit_amount
|
|
1253
|
+
# Amount per unit
|
|
1254
|
+
#
|
|
1255
|
+
# @return [String]
|
|
1256
|
+
required :unit_amount, String
|
|
1257
|
+
|
|
1258
|
+
# @!method initialize(tier_lower_bound:, unit_amount:)
|
|
1259
|
+
# Configuration for a single tiered with proration tier
|
|
1260
|
+
#
|
|
1261
|
+
# @param tier_lower_bound [String] Inclusive tier starting value
|
|
1262
|
+
#
|
|
1263
|
+
# @param unit_amount [String] Amount per unit
|
|
1264
|
+
end
|
|
926
1265
|
end
|
|
927
1266
|
end
|
|
928
1267
|
|
|
929
|
-
class
|
|
1268
|
+
class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel
|
|
930
1269
|
# @!attribute cadence
|
|
931
1270
|
# The cadence to bill for this price on.
|
|
932
1271
|
#
|
|
933
|
-
# @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::
|
|
934
|
-
required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::
|
|
1272
|
+
# @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence]
|
|
1273
|
+
required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence }
|
|
935
1274
|
|
|
936
|
-
# @!attribute
|
|
937
|
-
# Configuration for
|
|
1275
|
+
# @!attribute grouped_with_min_max_thresholds_config
|
|
1276
|
+
# Configuration for grouped_with_min_max_thresholds pricing
|
|
938
1277
|
#
|
|
939
|
-
# @return [Orb::Models::PlanCreateParams::Price::Price::
|
|
940
|
-
required :
|
|
941
|
-
-> { Orb::PlanCreateParams::Price::Price::
|
|
1278
|
+
# @return [Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig]
|
|
1279
|
+
required :grouped_with_min_max_thresholds_config,
|
|
1280
|
+
-> { Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig }
|
|
942
1281
|
|
|
943
1282
|
# @!attribute item_id
|
|
944
1283
|
# The id of the item the price will be associated with.
|
|
@@ -949,8 +1288,8 @@ module Orb
|
|
|
949
1288
|
# @!attribute model_type
|
|
950
1289
|
# The pricing model type
|
|
951
1290
|
#
|
|
952
|
-
# @return [Symbol, :
|
|
953
|
-
required :model_type, const: :
|
|
1291
|
+
# @return [Symbol, :grouped_with_min_max_thresholds]
|
|
1292
|
+
required :model_type, const: :grouped_with_min_max_thresholds
|
|
954
1293
|
|
|
955
1294
|
# @!attribute name
|
|
956
1295
|
# The name of the price.
|
|
@@ -989,11 +1328,7 @@ module Orb
|
|
|
989
1328
|
# The configuration for the rate of the price currency to the invoicing currency.
|
|
990
1329
|
#
|
|
991
1330
|
# @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
|
|
992
|
-
optional :conversion_rate_config,
|
|
993
|
-
union: -> {
|
|
994
|
-
Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::ConversionRateConfig
|
|
995
|
-
},
|
|
996
|
-
nil?: true
|
|
1331
|
+
optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
|
|
997
1332
|
|
|
998
1333
|
# @!attribute currency
|
|
999
1334
|
# An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
@@ -1059,14 +1394,14 @@ module Orb
|
|
|
1059
1394
|
# @return [String, nil]
|
|
1060
1395
|
optional :reference_id, String, nil?: true
|
|
1061
1396
|
|
|
1062
|
-
# @!method initialize(cadence:,
|
|
1397
|
+
# @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds)
|
|
1063
1398
|
# Some parameter documentations has been truncated, see
|
|
1064
|
-
# {Orb::Models::PlanCreateParams::Price::Price::
|
|
1399
|
+
# {Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds} for
|
|
1065
1400
|
# more details.
|
|
1066
1401
|
#
|
|
1067
|
-
# @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::
|
|
1402
|
+
# @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on.
|
|
1068
1403
|
#
|
|
1069
|
-
# @param
|
|
1404
|
+
# @param grouped_with_min_max_thresholds_config [Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing
|
|
1070
1405
|
#
|
|
1071
1406
|
# @param item_id [String] The id of the item the price will be associated with.
|
|
1072
1407
|
#
|
|
@@ -1100,11 +1435,11 @@ module Orb
|
|
|
1100
1435
|
#
|
|
1101
1436
|
# @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
|
|
1102
1437
|
#
|
|
1103
|
-
# @param model_type [Symbol, :
|
|
1438
|
+
# @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type
|
|
1104
1439
|
|
|
1105
1440
|
# The cadence to bill for this price on.
|
|
1106
1441
|
#
|
|
1107
|
-
# @see Orb::Models::PlanCreateParams::Price::Price::
|
|
1442
|
+
# @see Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds#cadence
|
|
1108
1443
|
module Cadence
|
|
1109
1444
|
extend Orb::Internal::Type::Enum
|
|
1110
1445
|
|
|
@@ -1119,42 +1454,794 @@ module Orb
|
|
|
1119
1454
|
# @return [Array<Symbol>]
|
|
1120
1455
|
end
|
|
1121
1456
|
|
|
1122
|
-
# @see Orb::Models::PlanCreateParams::Price::Price::
|
|
1123
|
-
class
|
|
1457
|
+
# @see Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config
|
|
1458
|
+
class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel
|
|
1459
|
+
# @!attribute grouping_key
|
|
1460
|
+
# The event property used to group before applying thresholds
|
|
1461
|
+
#
|
|
1462
|
+
# @return [String]
|
|
1463
|
+
required :grouping_key, String
|
|
1464
|
+
|
|
1465
|
+
# @!attribute maximum_charge
|
|
1466
|
+
# The maximum amount to charge each group
|
|
1467
|
+
#
|
|
1468
|
+
# @return [String]
|
|
1469
|
+
required :maximum_charge, String
|
|
1470
|
+
|
|
1471
|
+
# @!attribute minimum_charge
|
|
1472
|
+
# The minimum amount to charge each group, regardless of usage
|
|
1473
|
+
#
|
|
1474
|
+
# @return [String]
|
|
1475
|
+
required :minimum_charge, String
|
|
1476
|
+
|
|
1477
|
+
# @!attribute per_unit_rate
|
|
1478
|
+
# The base price charged per group
|
|
1479
|
+
#
|
|
1480
|
+
# @return [String]
|
|
1481
|
+
required :per_unit_rate, String
|
|
1482
|
+
|
|
1483
|
+
# @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:)
|
|
1484
|
+
# Configuration for grouped_with_min_max_thresholds pricing
|
|
1485
|
+
#
|
|
1486
|
+
# @param grouping_key [String] The event property used to group before applying thresholds
|
|
1487
|
+
#
|
|
1488
|
+
# @param maximum_charge [String] The maximum amount to charge each group
|
|
1489
|
+
#
|
|
1490
|
+
# @param minimum_charge [String] The minimum amount to charge each group, regardless of usage
|
|
1491
|
+
#
|
|
1492
|
+
# @param per_unit_rate [String] The base price charged per group
|
|
1493
|
+
end
|
|
1494
|
+
end
|
|
1495
|
+
|
|
1496
|
+
class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel
|
|
1497
|
+
# @!attribute cadence
|
|
1498
|
+
# The cadence to bill for this price on.
|
|
1499
|
+
#
|
|
1500
|
+
# @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence]
|
|
1501
|
+
required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence }
|
|
1502
|
+
|
|
1503
|
+
# @!attribute cumulative_grouped_allocation_config
|
|
1504
|
+
# Configuration for cumulative_grouped_allocation pricing
|
|
1505
|
+
#
|
|
1506
|
+
# @return [Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig]
|
|
1507
|
+
required :cumulative_grouped_allocation_config,
|
|
1508
|
+
-> { Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig }
|
|
1509
|
+
|
|
1510
|
+
# @!attribute item_id
|
|
1511
|
+
# The id of the item the price will be associated with.
|
|
1512
|
+
#
|
|
1513
|
+
# @return [String]
|
|
1514
|
+
required :item_id, String
|
|
1515
|
+
|
|
1516
|
+
# @!attribute model_type
|
|
1517
|
+
# The pricing model type
|
|
1518
|
+
#
|
|
1519
|
+
# @return [Symbol, :cumulative_grouped_allocation]
|
|
1520
|
+
required :model_type, const: :cumulative_grouped_allocation
|
|
1521
|
+
|
|
1522
|
+
# @!attribute name
|
|
1523
|
+
# The name of the price.
|
|
1524
|
+
#
|
|
1525
|
+
# @return [String]
|
|
1526
|
+
required :name, String
|
|
1527
|
+
|
|
1528
|
+
# @!attribute billable_metric_id
|
|
1529
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1530
|
+
# usage-based.
|
|
1531
|
+
#
|
|
1532
|
+
# @return [String, nil]
|
|
1533
|
+
optional :billable_metric_id, String, nil?: true
|
|
1534
|
+
|
|
1535
|
+
# @!attribute billed_in_advance
|
|
1536
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1537
|
+
# this is true, and in-arrears if this is false.
|
|
1538
|
+
#
|
|
1539
|
+
# @return [Boolean, nil]
|
|
1540
|
+
optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
|
|
1541
|
+
|
|
1542
|
+
# @!attribute billing_cycle_configuration
|
|
1543
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1544
|
+
# months.
|
|
1545
|
+
#
|
|
1546
|
+
# @return [Orb::Models::NewBillingCycleConfiguration, nil]
|
|
1547
|
+
optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
|
|
1548
|
+
|
|
1549
|
+
# @!attribute conversion_rate
|
|
1550
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1551
|
+
#
|
|
1552
|
+
# @return [Float, nil]
|
|
1553
|
+
optional :conversion_rate, Float, nil?: true
|
|
1554
|
+
|
|
1555
|
+
# @!attribute conversion_rate_config
|
|
1556
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1557
|
+
#
|
|
1558
|
+
# @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
|
|
1559
|
+
optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
|
|
1560
|
+
|
|
1561
|
+
# @!attribute currency
|
|
1562
|
+
# An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1563
|
+
# price is billed.
|
|
1564
|
+
#
|
|
1565
|
+
# @return [String, nil]
|
|
1566
|
+
optional :currency, String, nil?: true
|
|
1567
|
+
|
|
1568
|
+
# @!attribute dimensional_price_configuration
|
|
1569
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1570
|
+
#
|
|
1571
|
+
# @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
|
|
1572
|
+
optional :dimensional_price_configuration,
|
|
1573
|
+
-> {
|
|
1574
|
+
Orb::NewDimensionalPriceConfiguration
|
|
1575
|
+
},
|
|
1576
|
+
nil?: true
|
|
1577
|
+
|
|
1578
|
+
# @!attribute external_price_id
|
|
1579
|
+
# An alias for the price.
|
|
1580
|
+
#
|
|
1581
|
+
# @return [String, nil]
|
|
1582
|
+
optional :external_price_id, String, nil?: true
|
|
1583
|
+
|
|
1584
|
+
# @!attribute fixed_price_quantity
|
|
1585
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1586
|
+
# applied.
|
|
1587
|
+
#
|
|
1588
|
+
# @return [Float, nil]
|
|
1589
|
+
optional :fixed_price_quantity, Float, nil?: true
|
|
1590
|
+
|
|
1591
|
+
# @!attribute invoice_grouping_key
|
|
1592
|
+
# The property used to group this price on an invoice
|
|
1593
|
+
#
|
|
1594
|
+
# @return [String, nil]
|
|
1595
|
+
optional :invoice_grouping_key, String, nil?: true
|
|
1596
|
+
|
|
1597
|
+
# @!attribute invoicing_cycle_configuration
|
|
1598
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1599
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1600
|
+
#
|
|
1601
|
+
# @return [Orb::Models::NewBillingCycleConfiguration, nil]
|
|
1602
|
+
optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
|
|
1603
|
+
|
|
1604
|
+
# @!attribute license_type_id
|
|
1605
|
+
# The ID of the license type to associate with this price.
|
|
1606
|
+
#
|
|
1607
|
+
# @return [String, nil]
|
|
1608
|
+
optional :license_type_id, String, nil?: true
|
|
1609
|
+
|
|
1610
|
+
# @!attribute metadata
|
|
1611
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1612
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1613
|
+
# by setting `metadata` to `null`.
|
|
1614
|
+
#
|
|
1615
|
+
# @return [Hash{Symbol=>String, nil}, nil]
|
|
1616
|
+
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
|
1617
|
+
|
|
1618
|
+
# @!attribute reference_id
|
|
1619
|
+
# A transient ID that can be used to reference this price when adding adjustments
|
|
1620
|
+
# in the same API call.
|
|
1621
|
+
#
|
|
1622
|
+
# @return [String, nil]
|
|
1623
|
+
optional :reference_id, String, nil?: true
|
|
1624
|
+
|
|
1625
|
+
# @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation)
|
|
1626
|
+
# Some parameter documentations has been truncated, see
|
|
1627
|
+
# {Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation} for
|
|
1628
|
+
# more details.
|
|
1629
|
+
#
|
|
1630
|
+
# @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on.
|
|
1631
|
+
#
|
|
1632
|
+
# @param cumulative_grouped_allocation_config [Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing
|
|
1633
|
+
#
|
|
1634
|
+
# @param item_id [String] The id of the item the price will be associated with.
|
|
1635
|
+
#
|
|
1636
|
+
# @param name [String] The name of the price.
|
|
1637
|
+
#
|
|
1638
|
+
# @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
|
|
1639
|
+
#
|
|
1640
|
+
# @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
|
|
1641
|
+
#
|
|
1642
|
+
# @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
|
|
1643
|
+
#
|
|
1644
|
+
# @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
|
|
1645
|
+
#
|
|
1646
|
+
# @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
|
|
1647
|
+
#
|
|
1648
|
+
# @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr
|
|
1649
|
+
#
|
|
1650
|
+
# @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
|
|
1651
|
+
#
|
|
1652
|
+
# @param external_price_id [String, nil] An alias for the price.
|
|
1653
|
+
#
|
|
1654
|
+
# @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
|
|
1655
|
+
#
|
|
1656
|
+
# @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
|
|
1657
|
+
#
|
|
1658
|
+
# @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1659
|
+
#
|
|
1660
|
+
# @param license_type_id [String, nil] The ID of the license type to associate with this price.
|
|
1661
|
+
#
|
|
1662
|
+
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1663
|
+
#
|
|
1664
|
+
# @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
|
|
1665
|
+
#
|
|
1666
|
+
# @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type
|
|
1667
|
+
|
|
1668
|
+
# The cadence to bill for this price on.
|
|
1669
|
+
#
|
|
1670
|
+
# @see Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation#cadence
|
|
1671
|
+
module Cadence
|
|
1672
|
+
extend Orb::Internal::Type::Enum
|
|
1673
|
+
|
|
1674
|
+
ANNUAL = :annual
|
|
1675
|
+
SEMI_ANNUAL = :semi_annual
|
|
1676
|
+
MONTHLY = :monthly
|
|
1677
|
+
QUARTERLY = :quarterly
|
|
1678
|
+
ONE_TIME = :one_time
|
|
1679
|
+
CUSTOM = :custom
|
|
1680
|
+
|
|
1681
|
+
# @!method self.values
|
|
1682
|
+
# @return [Array<Symbol>]
|
|
1683
|
+
end
|
|
1684
|
+
|
|
1685
|
+
# @see Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config
|
|
1686
|
+
class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel
|
|
1124
1687
|
# @!attribute cumulative_allocation
|
|
1125
1688
|
# The overall allocation across all groups
|
|
1126
1689
|
#
|
|
1127
1690
|
# @return [String]
|
|
1128
|
-
required :cumulative_allocation, String
|
|
1691
|
+
required :cumulative_allocation, String
|
|
1692
|
+
|
|
1693
|
+
# @!attribute group_allocation
|
|
1694
|
+
# The allocation per individual group
|
|
1695
|
+
#
|
|
1696
|
+
# @return [String]
|
|
1697
|
+
required :group_allocation, String
|
|
1698
|
+
|
|
1699
|
+
# @!attribute grouping_key
|
|
1700
|
+
# The event property used to group usage before applying allocations
|
|
1701
|
+
#
|
|
1702
|
+
# @return [String]
|
|
1703
|
+
required :grouping_key, String
|
|
1704
|
+
|
|
1705
|
+
# @!attribute unit_amount
|
|
1706
|
+
# The amount to charge for each unit outside of the allocation
|
|
1707
|
+
#
|
|
1708
|
+
# @return [String]
|
|
1709
|
+
required :unit_amount, String
|
|
1710
|
+
|
|
1711
|
+
# @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:)
|
|
1712
|
+
# Configuration for cumulative_grouped_allocation pricing
|
|
1713
|
+
#
|
|
1714
|
+
# @param cumulative_allocation [String] The overall allocation across all groups
|
|
1715
|
+
#
|
|
1716
|
+
# @param group_allocation [String] The allocation per individual group
|
|
1717
|
+
#
|
|
1718
|
+
# @param grouping_key [String] The event property used to group usage before applying allocations
|
|
1719
|
+
#
|
|
1720
|
+
# @param unit_amount [String] The amount to charge for each unit outside of the allocation
|
|
1721
|
+
end
|
|
1722
|
+
end
|
|
1723
|
+
|
|
1724
|
+
class DailyCreditAllowance < Orb::Internal::Type::BaseModel
|
|
1725
|
+
# @!attribute cadence
|
|
1726
|
+
# The cadence to bill for this price on.
|
|
1727
|
+
#
|
|
1728
|
+
# @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence]
|
|
1729
|
+
required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence }
|
|
1730
|
+
|
|
1731
|
+
# @!attribute daily_credit_allowance_config
|
|
1732
|
+
# Configuration for daily_credit_allowance pricing
|
|
1733
|
+
#
|
|
1734
|
+
# @return [Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig]
|
|
1735
|
+
required :daily_credit_allowance_config,
|
|
1736
|
+
-> { Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig }
|
|
1737
|
+
|
|
1738
|
+
# @!attribute item_id
|
|
1739
|
+
# The id of the item the price will be associated with.
|
|
1740
|
+
#
|
|
1741
|
+
# @return [String]
|
|
1742
|
+
required :item_id, String
|
|
1743
|
+
|
|
1744
|
+
# @!attribute model_type
|
|
1745
|
+
# The pricing model type
|
|
1746
|
+
#
|
|
1747
|
+
# @return [Symbol, :daily_credit_allowance]
|
|
1748
|
+
required :model_type, const: :daily_credit_allowance
|
|
1749
|
+
|
|
1750
|
+
# @!attribute name
|
|
1751
|
+
# The name of the price.
|
|
1752
|
+
#
|
|
1753
|
+
# @return [String]
|
|
1754
|
+
required :name, String
|
|
1755
|
+
|
|
1756
|
+
# @!attribute billable_metric_id
|
|
1757
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1758
|
+
# usage-based.
|
|
1759
|
+
#
|
|
1760
|
+
# @return [String, nil]
|
|
1761
|
+
optional :billable_metric_id, String, nil?: true
|
|
1762
|
+
|
|
1763
|
+
# @!attribute billed_in_advance
|
|
1764
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1765
|
+
# this is true, and in-arrears if this is false.
|
|
1766
|
+
#
|
|
1767
|
+
# @return [Boolean, nil]
|
|
1768
|
+
optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
|
|
1769
|
+
|
|
1770
|
+
# @!attribute billing_cycle_configuration
|
|
1771
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1772
|
+
# months.
|
|
1773
|
+
#
|
|
1774
|
+
# @return [Orb::Models::NewBillingCycleConfiguration, nil]
|
|
1775
|
+
optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
|
|
1776
|
+
|
|
1777
|
+
# @!attribute conversion_rate
|
|
1778
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1779
|
+
#
|
|
1780
|
+
# @return [Float, nil]
|
|
1781
|
+
optional :conversion_rate, Float, nil?: true
|
|
1782
|
+
|
|
1783
|
+
# @!attribute conversion_rate_config
|
|
1784
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1785
|
+
#
|
|
1786
|
+
# @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
|
|
1787
|
+
optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
|
|
1788
|
+
|
|
1789
|
+
# @!attribute currency
|
|
1790
|
+
# An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1791
|
+
# price is billed.
|
|
1792
|
+
#
|
|
1793
|
+
# @return [String, nil]
|
|
1794
|
+
optional :currency, String, nil?: true
|
|
1795
|
+
|
|
1796
|
+
# @!attribute dimensional_price_configuration
|
|
1797
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1798
|
+
#
|
|
1799
|
+
# @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
|
|
1800
|
+
optional :dimensional_price_configuration,
|
|
1801
|
+
-> {
|
|
1802
|
+
Orb::NewDimensionalPriceConfiguration
|
|
1803
|
+
},
|
|
1804
|
+
nil?: true
|
|
1805
|
+
|
|
1806
|
+
# @!attribute external_price_id
|
|
1807
|
+
# An alias for the price.
|
|
1808
|
+
#
|
|
1809
|
+
# @return [String, nil]
|
|
1810
|
+
optional :external_price_id, String, nil?: true
|
|
1811
|
+
|
|
1812
|
+
# @!attribute fixed_price_quantity
|
|
1813
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1814
|
+
# applied.
|
|
1815
|
+
#
|
|
1816
|
+
# @return [Float, nil]
|
|
1817
|
+
optional :fixed_price_quantity, Float, nil?: true
|
|
1818
|
+
|
|
1819
|
+
# @!attribute invoice_grouping_key
|
|
1820
|
+
# The property used to group this price on an invoice
|
|
1821
|
+
#
|
|
1822
|
+
# @return [String, nil]
|
|
1823
|
+
optional :invoice_grouping_key, String, nil?: true
|
|
1824
|
+
|
|
1825
|
+
# @!attribute invoicing_cycle_configuration
|
|
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
|
+
#
|
|
1829
|
+
# @return [Orb::Models::NewBillingCycleConfiguration, nil]
|
|
1830
|
+
optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
|
|
1831
|
+
|
|
1832
|
+
# @!attribute license_type_id
|
|
1833
|
+
# The ID of the license type to associate with this price.
|
|
1834
|
+
#
|
|
1835
|
+
# @return [String, nil]
|
|
1836
|
+
optional :license_type_id, String, nil?: true
|
|
1837
|
+
|
|
1838
|
+
# @!attribute metadata
|
|
1839
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1840
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1841
|
+
# by setting `metadata` to `null`.
|
|
1842
|
+
#
|
|
1843
|
+
# @return [Hash{Symbol=>String, nil}, nil]
|
|
1844
|
+
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
|
1845
|
+
|
|
1846
|
+
# @!attribute reference_id
|
|
1847
|
+
# A transient ID that can be used to reference this price when adding adjustments
|
|
1848
|
+
# in the same API call.
|
|
1849
|
+
#
|
|
1850
|
+
# @return [String, nil]
|
|
1851
|
+
optional :reference_id, String, nil?: true
|
|
1852
|
+
|
|
1853
|
+
# @!method initialize(cadence:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance)
|
|
1854
|
+
# Some parameter documentations has been truncated, see
|
|
1855
|
+
# {Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance} for more
|
|
1856
|
+
# details.
|
|
1857
|
+
#
|
|
1858
|
+
# @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on.
|
|
1859
|
+
#
|
|
1860
|
+
# @param daily_credit_allowance_config [Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing
|
|
1861
|
+
#
|
|
1862
|
+
# @param item_id [String] The id of the item the price will be associated with.
|
|
1863
|
+
#
|
|
1864
|
+
# @param name [String] The name of the price.
|
|
1865
|
+
#
|
|
1866
|
+
# @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
|
|
1867
|
+
#
|
|
1868
|
+
# @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
|
|
1869
|
+
#
|
|
1870
|
+
# @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
|
|
1871
|
+
#
|
|
1872
|
+
# @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
|
|
1873
|
+
#
|
|
1874
|
+
# @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
|
|
1875
|
+
#
|
|
1876
|
+
# @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr
|
|
1877
|
+
#
|
|
1878
|
+
# @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
|
|
1879
|
+
#
|
|
1880
|
+
# @param external_price_id [String, nil] An alias for the price.
|
|
1881
|
+
#
|
|
1882
|
+
# @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
|
|
1883
|
+
#
|
|
1884
|
+
# @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
|
|
1885
|
+
#
|
|
1886
|
+
# @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1887
|
+
#
|
|
1888
|
+
# @param license_type_id [String, nil] The ID of the license type to associate with this price.
|
|
1889
|
+
#
|
|
1890
|
+
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1891
|
+
#
|
|
1892
|
+
# @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
|
|
1893
|
+
#
|
|
1894
|
+
# @param model_type [Symbol, :daily_credit_allowance] The pricing model type
|
|
1895
|
+
|
|
1896
|
+
# The cadence to bill for this price on.
|
|
1897
|
+
#
|
|
1898
|
+
# @see Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance#cadence
|
|
1899
|
+
module Cadence
|
|
1900
|
+
extend Orb::Internal::Type::Enum
|
|
1901
|
+
|
|
1902
|
+
ANNUAL = :annual
|
|
1903
|
+
SEMI_ANNUAL = :semi_annual
|
|
1904
|
+
MONTHLY = :monthly
|
|
1905
|
+
QUARTERLY = :quarterly
|
|
1906
|
+
ONE_TIME = :one_time
|
|
1907
|
+
CUSTOM = :custom
|
|
1908
|
+
|
|
1909
|
+
# @!method self.values
|
|
1910
|
+
# @return [Array<Symbol>]
|
|
1911
|
+
end
|
|
1912
|
+
|
|
1913
|
+
# @see Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance#daily_credit_allowance_config
|
|
1914
|
+
class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel
|
|
1915
|
+
# @!attribute daily_allowance
|
|
1916
|
+
# Credits granted per day. Lose-it-or-use-it; does not roll over.
|
|
1917
|
+
#
|
|
1918
|
+
# @return [String]
|
|
1919
|
+
required :daily_allowance, String
|
|
1920
|
+
|
|
1921
|
+
# @!attribute default_unit_amount
|
|
1922
|
+
# Default per-unit credit rate for any usage not bucketed into a specified
|
|
1923
|
+
# matrix_value
|
|
1924
|
+
#
|
|
1925
|
+
# @return [String]
|
|
1926
|
+
required :default_unit_amount, String
|
|
1927
|
+
|
|
1928
|
+
# @!attribute dimensions
|
|
1929
|
+
# One or two event property values to evaluate matrix groups by
|
|
1930
|
+
#
|
|
1931
|
+
# @return [Array<String, nil>]
|
|
1932
|
+
required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true]
|
|
1933
|
+
|
|
1934
|
+
# @!attribute event_day_property
|
|
1935
|
+
# Event property whose value identifies the day bucket the event belongs to (e.g.
|
|
1936
|
+
# 'event_day' set to an ISO date string in the customer's timezone). The allowance
|
|
1937
|
+
# resets per distinct value of this property.
|
|
1938
|
+
#
|
|
1939
|
+
# @return [String]
|
|
1940
|
+
required :event_day_property, String
|
|
1941
|
+
|
|
1942
|
+
# @!attribute matrix_values
|
|
1943
|
+
# Per-dimension credit rates
|
|
1944
|
+
#
|
|
1945
|
+
# @return [Array<Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue>]
|
|
1946
|
+
required :matrix_values,
|
|
1947
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] }
|
|
1948
|
+
|
|
1949
|
+
# @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:)
|
|
1950
|
+
# Some parameter documentations has been truncated, see
|
|
1951
|
+
# {Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig}
|
|
1952
|
+
# for more details.
|
|
1953
|
+
#
|
|
1954
|
+
# Configuration for daily_credit_allowance pricing
|
|
1955
|
+
#
|
|
1956
|
+
# @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over.
|
|
1957
|
+
#
|
|
1958
|
+
# @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified
|
|
1959
|
+
# matrix\_
|
|
1960
|
+
#
|
|
1961
|
+
# @param dimensions [Array<String, nil>] One or two event property values to evaluate matrix groups by
|
|
1962
|
+
#
|
|
1963
|
+
# @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g.
|
|
1964
|
+
#
|
|
1965
|
+
# @param matrix_values [Array<Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue>] Per-dimension credit rates
|
|
1966
|
+
|
|
1967
|
+
class MatrixValue < Orb::Internal::Type::BaseModel
|
|
1968
|
+
# @!attribute dimension_values
|
|
1969
|
+
# One or two matrix keys to filter usage to this value by. For example, ["model"]
|
|
1970
|
+
# could be used to apply a different credit rate to each AI model.
|
|
1971
|
+
#
|
|
1972
|
+
# @return [Array<String, nil>]
|
|
1973
|
+
required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true]
|
|
1974
|
+
|
|
1975
|
+
# @!attribute unit_amount
|
|
1976
|
+
# Credits charged per unit of usage matching the specified dimension_values
|
|
1977
|
+
#
|
|
1978
|
+
# @return [String]
|
|
1979
|
+
required :unit_amount, String
|
|
1980
|
+
|
|
1981
|
+
# @!method initialize(dimension_values:, unit_amount:)
|
|
1982
|
+
# Some parameter documentations has been truncated, see
|
|
1983
|
+
# {Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue}
|
|
1984
|
+
# for more details.
|
|
1985
|
+
#
|
|
1986
|
+
# Per-dimension credit price for the daily credit allowance model.
|
|
1987
|
+
#
|
|
1988
|
+
# @param dimension_values [Array<String, nil>] One or two matrix keys to filter usage to this value by. For example, ["model"]
|
|
1989
|
+
#
|
|
1990
|
+
# @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values
|
|
1991
|
+
end
|
|
1992
|
+
end
|
|
1993
|
+
end
|
|
1994
|
+
|
|
1995
|
+
class MeteredAllowance < Orb::Internal::Type::BaseModel
|
|
1996
|
+
# @!attribute cadence
|
|
1997
|
+
# The cadence to bill for this price on.
|
|
1998
|
+
#
|
|
1999
|
+
# @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::Cadence]
|
|
2000
|
+
required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence }
|
|
2001
|
+
|
|
2002
|
+
# @!attribute item_id
|
|
2003
|
+
# The id of the item the price will be associated with.
|
|
2004
|
+
#
|
|
2005
|
+
# @return [String]
|
|
2006
|
+
required :item_id, String
|
|
2007
|
+
|
|
2008
|
+
# @!attribute metered_allowance_config
|
|
2009
|
+
# Configuration for metered_allowance pricing
|
|
2010
|
+
#
|
|
2011
|
+
# @return [Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig]
|
|
2012
|
+
required :metered_allowance_config,
|
|
2013
|
+
-> { Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig }
|
|
2014
|
+
|
|
2015
|
+
# @!attribute model_type
|
|
2016
|
+
# The pricing model type
|
|
2017
|
+
#
|
|
2018
|
+
# @return [Symbol, :metered_allowance]
|
|
2019
|
+
required :model_type, const: :metered_allowance
|
|
2020
|
+
|
|
2021
|
+
# @!attribute name
|
|
2022
|
+
# The name of the price.
|
|
2023
|
+
#
|
|
2024
|
+
# @return [String]
|
|
2025
|
+
required :name, String
|
|
2026
|
+
|
|
2027
|
+
# @!attribute billable_metric_id
|
|
2028
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
2029
|
+
# usage-based.
|
|
2030
|
+
#
|
|
2031
|
+
# @return [String, nil]
|
|
2032
|
+
optional :billable_metric_id, String, nil?: true
|
|
2033
|
+
|
|
2034
|
+
# @!attribute billed_in_advance
|
|
2035
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
2036
|
+
# this is true, and in-arrears if this is false.
|
|
2037
|
+
#
|
|
2038
|
+
# @return [Boolean, nil]
|
|
2039
|
+
optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
|
|
2040
|
+
|
|
2041
|
+
# @!attribute billing_cycle_configuration
|
|
2042
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
2043
|
+
# months.
|
|
2044
|
+
#
|
|
2045
|
+
# @return [Orb::Models::NewBillingCycleConfiguration, nil]
|
|
2046
|
+
optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
|
|
2047
|
+
|
|
2048
|
+
# @!attribute conversion_rate
|
|
2049
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
2050
|
+
#
|
|
2051
|
+
# @return [Float, nil]
|
|
2052
|
+
optional :conversion_rate, Float, nil?: true
|
|
2053
|
+
|
|
2054
|
+
# @!attribute conversion_rate_config
|
|
2055
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
2056
|
+
#
|
|
2057
|
+
# @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
|
|
2058
|
+
optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
|
|
2059
|
+
|
|
2060
|
+
# @!attribute currency
|
|
2061
|
+
# An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
2062
|
+
# price is billed.
|
|
2063
|
+
#
|
|
2064
|
+
# @return [String, nil]
|
|
2065
|
+
optional :currency, String, nil?: true
|
|
2066
|
+
|
|
2067
|
+
# @!attribute dimensional_price_configuration
|
|
2068
|
+
# For dimensional price: specifies a price group and dimension values
|
|
2069
|
+
#
|
|
2070
|
+
# @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
|
|
2071
|
+
optional :dimensional_price_configuration,
|
|
2072
|
+
-> {
|
|
2073
|
+
Orb::NewDimensionalPriceConfiguration
|
|
2074
|
+
},
|
|
2075
|
+
nil?: true
|
|
2076
|
+
|
|
2077
|
+
# @!attribute external_price_id
|
|
2078
|
+
# An alias for the price.
|
|
2079
|
+
#
|
|
2080
|
+
# @return [String, nil]
|
|
2081
|
+
optional :external_price_id, String, nil?: true
|
|
2082
|
+
|
|
2083
|
+
# @!attribute fixed_price_quantity
|
|
2084
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
2085
|
+
# applied.
|
|
2086
|
+
#
|
|
2087
|
+
# @return [Float, nil]
|
|
2088
|
+
optional :fixed_price_quantity, Float, nil?: true
|
|
2089
|
+
|
|
2090
|
+
# @!attribute invoice_grouping_key
|
|
2091
|
+
# The property used to group this price on an invoice
|
|
2092
|
+
#
|
|
2093
|
+
# @return [String, nil]
|
|
2094
|
+
optional :invoice_grouping_key, String, nil?: true
|
|
2095
|
+
|
|
2096
|
+
# @!attribute invoicing_cycle_configuration
|
|
2097
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
2098
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
2099
|
+
#
|
|
2100
|
+
# @return [Orb::Models::NewBillingCycleConfiguration, nil]
|
|
2101
|
+
optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
|
|
2102
|
+
|
|
2103
|
+
# @!attribute license_type_id
|
|
2104
|
+
# The ID of the license type to associate with this price.
|
|
2105
|
+
#
|
|
2106
|
+
# @return [String, nil]
|
|
2107
|
+
optional :license_type_id, String, nil?: true
|
|
2108
|
+
|
|
2109
|
+
# @!attribute metadata
|
|
2110
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
2111
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
2112
|
+
# by setting `metadata` to `null`.
|
|
2113
|
+
#
|
|
2114
|
+
# @return [Hash{Symbol=>String, nil}, nil]
|
|
2115
|
+
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
|
2116
|
+
|
|
2117
|
+
# @!attribute reference_id
|
|
2118
|
+
# A transient ID that can be used to reference this price when adding adjustments
|
|
2119
|
+
# in the same API call.
|
|
2120
|
+
#
|
|
2121
|
+
# @return [String, nil]
|
|
2122
|
+
optional :reference_id, String, nil?: true
|
|
2123
|
+
|
|
2124
|
+
# @!method initialize(cadence:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance)
|
|
2125
|
+
# Some parameter documentations has been truncated, see
|
|
2126
|
+
# {Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance} for more
|
|
2127
|
+
# details.
|
|
2128
|
+
#
|
|
2129
|
+
# @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::Cadence] The cadence to bill for this price on.
|
|
2130
|
+
#
|
|
2131
|
+
# @param item_id [String] The id of the item the price will be associated with.
|
|
2132
|
+
#
|
|
2133
|
+
# @param metered_allowance_config [Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing
|
|
2134
|
+
#
|
|
2135
|
+
# @param name [String] The name of the price.
|
|
2136
|
+
#
|
|
2137
|
+
# @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
|
|
2138
|
+
#
|
|
2139
|
+
# @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
|
|
2140
|
+
#
|
|
2141
|
+
# @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
|
|
2142
|
+
#
|
|
2143
|
+
# @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
|
|
2144
|
+
#
|
|
2145
|
+
# @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
|
|
2146
|
+
#
|
|
2147
|
+
# @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr
|
|
2148
|
+
#
|
|
2149
|
+
# @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
|
|
2150
|
+
#
|
|
2151
|
+
# @param external_price_id [String, nil] An alias for the price.
|
|
2152
|
+
#
|
|
2153
|
+
# @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
|
|
2154
|
+
#
|
|
2155
|
+
# @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
|
|
2156
|
+
#
|
|
2157
|
+
# @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
2158
|
+
#
|
|
2159
|
+
# @param license_type_id [String, nil] The ID of the license type to associate with this price.
|
|
2160
|
+
#
|
|
2161
|
+
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
|
2162
|
+
#
|
|
2163
|
+
# @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
|
|
2164
|
+
#
|
|
2165
|
+
# @param model_type [Symbol, :metered_allowance] The pricing model type
|
|
2166
|
+
|
|
2167
|
+
# The cadence to bill for this price on.
|
|
2168
|
+
#
|
|
2169
|
+
# @see Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance#cadence
|
|
2170
|
+
module Cadence
|
|
2171
|
+
extend Orb::Internal::Type::Enum
|
|
2172
|
+
|
|
2173
|
+
ANNUAL = :annual
|
|
2174
|
+
SEMI_ANNUAL = :semi_annual
|
|
2175
|
+
MONTHLY = :monthly
|
|
2176
|
+
QUARTERLY = :quarterly
|
|
2177
|
+
ONE_TIME = :one_time
|
|
2178
|
+
CUSTOM = :custom
|
|
2179
|
+
|
|
2180
|
+
# @!method self.values
|
|
2181
|
+
# @return [Array<Symbol>]
|
|
2182
|
+
end
|
|
2183
|
+
|
|
2184
|
+
# @see Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance#metered_allowance_config
|
|
2185
|
+
class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel
|
|
2186
|
+
# @!attribute allowance_grouping_value
|
|
2187
|
+
# The grouping_key value whose summed quantity represents the allowance for this
|
|
2188
|
+
# period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
|
|
2189
|
+
# — credit can never exceed actual usage.
|
|
2190
|
+
#
|
|
2191
|
+
# @return [String]
|
|
2192
|
+
required :allowance_grouping_value, String
|
|
1129
2193
|
|
|
1130
|
-
# @!attribute
|
|
1131
|
-
# The
|
|
2194
|
+
# @!attribute consumption_grouping_value
|
|
2195
|
+
# The grouping_key value whose summed quantity represents consumption (e.g.
|
|
2196
|
+
# 'download'). Charged at unit_amount.
|
|
1132
2197
|
#
|
|
1133
2198
|
# @return [String]
|
|
1134
|
-
required :
|
|
2199
|
+
required :consumption_grouping_value, String
|
|
1135
2200
|
|
|
1136
2201
|
# @!attribute grouping_key
|
|
1137
|
-
#
|
|
2202
|
+
# Event property used to partition the metric into consumption and allowance
|
|
2203
|
+
# quantities (e.g. 'event_name'). The metric is queried with this key and the two
|
|
2204
|
+
# values below select which partition is which.
|
|
1138
2205
|
#
|
|
1139
2206
|
# @return [String]
|
|
1140
2207
|
required :grouping_key, String
|
|
1141
2208
|
|
|
1142
2209
|
# @!attribute unit_amount
|
|
1143
|
-
#
|
|
2210
|
+
# Per-unit price applied to gross consumption and to the allowance credit.
|
|
1144
2211
|
#
|
|
1145
2212
|
# @return [String]
|
|
1146
2213
|
required :unit_amount, String
|
|
1147
2214
|
|
|
1148
|
-
# @!
|
|
1149
|
-
#
|
|
2215
|
+
# @!attribute allowance_display_name
|
|
2216
|
+
# Sub-line label for the credit row (e.g. 'Up to 3x free egress').
|
|
1150
2217
|
#
|
|
1151
|
-
# @
|
|
2218
|
+
# @return [String, nil]
|
|
2219
|
+
optional :allowance_display_name, String
|
|
2220
|
+
|
|
2221
|
+
# @!attribute consumption_display_name
|
|
2222
|
+
# Sub-line label for the gross consumption row (e.g. 'bytes gotten').
|
|
1152
2223
|
#
|
|
1153
|
-
# @
|
|
2224
|
+
# @return [String, nil]
|
|
2225
|
+
optional :consumption_display_name, String
|
|
2226
|
+
|
|
2227
|
+
# @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil)
|
|
2228
|
+
# Some parameter documentations has been truncated, see
|
|
2229
|
+
# {Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig}
|
|
2230
|
+
# for more details.
|
|
1154
2231
|
#
|
|
1155
|
-
#
|
|
2232
|
+
# Configuration for metered_allowance pricing
|
|
1156
2233
|
#
|
|
1157
|
-
# @param
|
|
2234
|
+
# @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p
|
|
2235
|
+
#
|
|
2236
|
+
# @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl
|
|
2237
|
+
#
|
|
2238
|
+
# @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant
|
|
2239
|
+
#
|
|
2240
|
+
# @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit.
|
|
2241
|
+
#
|
|
2242
|
+
# @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress').
|
|
2243
|
+
#
|
|
2244
|
+
# @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten').
|
|
1158
2245
|
end
|
|
1159
2246
|
end
|
|
1160
2247
|
|
|
@@ -1220,9 +2307,7 @@ module Orb
|
|
|
1220
2307
|
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1221
2308
|
#
|
|
1222
2309
|
# @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
|
|
1223
|
-
optional :conversion_rate_config,
|
|
1224
|
-
union: -> { Orb::PlanCreateParams::Price::Price::Percent::ConversionRateConfig },
|
|
1225
|
-
nil?: true
|
|
2310
|
+
optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
|
|
1226
2311
|
|
|
1227
2312
|
# @!attribute currency
|
|
1228
2313
|
# An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
@@ -1350,15 +2435,45 @@ module Orb
|
|
|
1350
2435
|
# @see Orb::Models::PlanCreateParams::Price::Price::Percent#percent_config
|
|
1351
2436
|
class PercentConfig < Orb::Internal::Type::BaseModel
|
|
1352
2437
|
# @!attribute percent
|
|
1353
|
-
#
|
|
2438
|
+
# Fraction of the component subtotals to charge (0 < percent <= 1).
|
|
1354
2439
|
#
|
|
1355
2440
|
# @return [Float]
|
|
1356
2441
|
required :percent, Float
|
|
1357
2442
|
|
|
1358
|
-
# @!
|
|
2443
|
+
# @!attribute maximum_amount
|
|
2444
|
+
# Maximum amount to charge. If unset, the fee has no upper bound.
|
|
2445
|
+
#
|
|
2446
|
+
# @return [String, nil]
|
|
2447
|
+
optional :maximum_amount, String, nil?: true
|
|
2448
|
+
|
|
2449
|
+
# @!attribute minimum_amount
|
|
2450
|
+
# Minimum amount to charge. If unset, the fee is bounded below by 0.
|
|
2451
|
+
#
|
|
2452
|
+
# @return [String, nil]
|
|
2453
|
+
optional :minimum_amount, String, nil?: true
|
|
2454
|
+
|
|
2455
|
+
# @!attribute prorated
|
|
2456
|
+
# If true, the minimum_amount is prorated based on the service period. The
|
|
2457
|
+
# maximum_amount is an absolute cap (never prorated), and the percent applied to
|
|
2458
|
+
# upstream subtotals is never prorated either.
|
|
2459
|
+
#
|
|
2460
|
+
# @return [Boolean, nil]
|
|
2461
|
+
optional :prorated, Orb::Internal::Type::Boolean
|
|
2462
|
+
|
|
2463
|
+
# @!method initialize(percent:, maximum_amount: nil, minimum_amount: nil, prorated: nil)
|
|
2464
|
+
# Some parameter documentations has been truncated, see
|
|
2465
|
+
# {Orb::Models::PlanCreateParams::Price::Price::Percent::PercentConfig} for more
|
|
2466
|
+
# details.
|
|
2467
|
+
#
|
|
1359
2468
|
# Configuration for percent pricing
|
|
1360
2469
|
#
|
|
1361
|
-
# @param percent [Float]
|
|
2470
|
+
# @param percent [Float] Fraction of the component subtotals to charge (0 < percent <= 1).
|
|
2471
|
+
#
|
|
2472
|
+
# @param maximum_amount [String, nil] Maximum amount to charge. If unset, the fee has no upper bound.
|
|
2473
|
+
#
|
|
2474
|
+
# @param minimum_amount [String, nil] Minimum amount to charge. If unset, the fee is bounded below by 0.
|
|
2475
|
+
#
|
|
2476
|
+
# @param prorated [Boolean] If true, the minimum_amount is prorated based on the service period. The maximum
|
|
1362
2477
|
end
|
|
1363
2478
|
end
|
|
1364
2479
|
|
|
@@ -1424,9 +2539,7 @@ module Orb
|
|
|
1424
2539
|
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1425
2540
|
#
|
|
1426
2541
|
# @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
|
|
1427
|
-
optional :conversion_rate_config,
|
|
1428
|
-
union: -> { Orb::PlanCreateParams::Price::Price::EventOutput::ConversionRateConfig },
|
|
1429
|
-
nil?: true
|
|
2542
|
+
optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
|
|
1430
2543
|
|
|
1431
2544
|
# @!attribute currency
|
|
1432
2545
|
# An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
@@ -1590,7 +2703,7 @@ module Orb
|
|
|
1590
2703
|
end
|
|
1591
2704
|
|
|
1592
2705
|
# @!method self.variants
|
|
1593
|
-
# @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput)]
|
|
2706
|
+
# @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput)]
|
|
1594
2707
|
end
|
|
1595
2708
|
end
|
|
1596
2709
|
|
|
@@ -1598,7 +2711,7 @@ module Orb
|
|
|
1598
2711
|
# @!attribute adjustment
|
|
1599
2712
|
# The definition of a new adjustment to create and add to the plan.
|
|
1600
2713
|
#
|
|
1601
|
-
# @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum]
|
|
2714
|
+
# @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum, Orb::Models::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount]
|
|
1602
2715
|
required :adjustment, union: -> { Orb::PlanCreateParams::Adjustment::Adjustment }
|
|
1603
2716
|
|
|
1604
2717
|
# @!attribute plan_phase_order
|
|
@@ -1608,7 +2721,7 @@ module Orb
|
|
|
1608
2721
|
optional :plan_phase_order, Integer, nil?: true
|
|
1609
2722
|
|
|
1610
2723
|
# @!method initialize(adjustment:, plan_phase_order: nil)
|
|
1611
|
-
# @param adjustment [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] The definition of a new adjustment to create and add to the plan.
|
|
2724
|
+
# @param adjustment [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum, Orb::Models::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount] The definition of a new adjustment to create and add to the plan.
|
|
1612
2725
|
#
|
|
1613
2726
|
# @param plan_phase_order [Integer, nil] The phase to add this adjustment to.
|
|
1614
2727
|
|
|
@@ -1630,8 +2743,215 @@ module Orb
|
|
|
1630
2743
|
|
|
1631
2744
|
variant :maximum, -> { Orb::NewMaximum }
|
|
1632
2745
|
|
|
2746
|
+
variant :tiered_percentage_discount,
|
|
2747
|
+
-> { Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount }
|
|
2748
|
+
|
|
2749
|
+
class TieredPercentageDiscount < Orb::Internal::Type::BaseModel
|
|
2750
|
+
# @!attribute adjustment_type
|
|
2751
|
+
#
|
|
2752
|
+
# @return [Symbol, :tiered_percentage_discount]
|
|
2753
|
+
required :adjustment_type, const: :tiered_percentage_discount
|
|
2754
|
+
|
|
2755
|
+
# @!attribute tiers
|
|
2756
|
+
#
|
|
2757
|
+
# @return [Array<Orb::Models::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Tier>]
|
|
2758
|
+
required :tiers,
|
|
2759
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Tier] }
|
|
2760
|
+
|
|
2761
|
+
# @!attribute applies_to_all
|
|
2762
|
+
# If set, the adjustment will apply to every price on the subscription.
|
|
2763
|
+
#
|
|
2764
|
+
# @return [Boolean, Orb::Models::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::AppliesToAll, nil]
|
|
2765
|
+
optional :applies_to_all,
|
|
2766
|
+
enum: -> {
|
|
2767
|
+
Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::AppliesToAll
|
|
2768
|
+
},
|
|
2769
|
+
nil?: true
|
|
2770
|
+
|
|
2771
|
+
# @!attribute applies_to_item_ids
|
|
2772
|
+
# The set of item IDs to which this adjustment applies.
|
|
2773
|
+
#
|
|
2774
|
+
# @return [Array<String>, nil]
|
|
2775
|
+
optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
|
2776
|
+
|
|
2777
|
+
# @!attribute applies_to_price_ids
|
|
2778
|
+
# The set of price IDs to which this adjustment applies.
|
|
2779
|
+
#
|
|
2780
|
+
# @return [Array<String>, nil]
|
|
2781
|
+
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
|
2782
|
+
|
|
2783
|
+
# @!attribute currency
|
|
2784
|
+
# If set, only prices in the specified currency will have the adjustment applied.
|
|
2785
|
+
#
|
|
2786
|
+
# @return [String, nil]
|
|
2787
|
+
optional :currency, String, nil?: true
|
|
2788
|
+
|
|
2789
|
+
# @!attribute filters
|
|
2790
|
+
# A list of filters that determine which prices this adjustment will apply to.
|
|
2791
|
+
#
|
|
2792
|
+
# @return [Array<Orb::Models::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter>, nil]
|
|
2793
|
+
optional :filters,
|
|
2794
|
+
-> {
|
|
2795
|
+
Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter]
|
|
2796
|
+
},
|
|
2797
|
+
nil?: true
|
|
2798
|
+
|
|
2799
|
+
# @!attribute is_invoice_level
|
|
2800
|
+
# When false, this adjustment will be applied to a single price. Otherwise, it
|
|
2801
|
+
# will be applied at the invoice level, possibly to multiple prices.
|
|
2802
|
+
#
|
|
2803
|
+
# @return [Boolean, nil]
|
|
2804
|
+
optional :is_invoice_level, Orb::Internal::Type::Boolean
|
|
2805
|
+
|
|
2806
|
+
# @!attribute price_type
|
|
2807
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
|
2808
|
+
#
|
|
2809
|
+
# @return [Symbol, Orb::Models::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::PriceType, nil]
|
|
2810
|
+
optional :price_type,
|
|
2811
|
+
enum: -> {
|
|
2812
|
+
Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::PriceType
|
|
2813
|
+
},
|
|
2814
|
+
nil?: true
|
|
2815
|
+
|
|
2816
|
+
# @!method initialize(tiers:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :tiered_percentage_discount)
|
|
2817
|
+
# Some parameter documentations has been truncated, see
|
|
2818
|
+
# {Orb::Models::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount}
|
|
2819
|
+
# for more details.
|
|
2820
|
+
#
|
|
2821
|
+
# @param tiers [Array<Orb::Models::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Tier>]
|
|
2822
|
+
#
|
|
2823
|
+
# @param applies_to_all [Boolean, Orb::Models::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
|
|
2824
|
+
#
|
|
2825
|
+
# @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
|
|
2826
|
+
#
|
|
2827
|
+
# @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
|
|
2828
|
+
#
|
|
2829
|
+
# @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
|
|
2830
|
+
#
|
|
2831
|
+
# @param filters [Array<Orb::Models::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
|
|
2832
|
+
#
|
|
2833
|
+
# @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
|
|
2834
|
+
#
|
|
2835
|
+
# @param price_type [Symbol, Orb::Models::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
|
|
2836
|
+
#
|
|
2837
|
+
# @param adjustment_type [Symbol, :tiered_percentage_discount]
|
|
2838
|
+
|
|
2839
|
+
class Tier < Orb::Internal::Type::BaseModel
|
|
2840
|
+
# @!attribute lower_bound
|
|
2841
|
+
# Exclusive lower bound of cumulative spend for this tier.
|
|
2842
|
+
#
|
|
2843
|
+
# @return [Float]
|
|
2844
|
+
required :lower_bound, Float
|
|
2845
|
+
|
|
2846
|
+
# @!attribute percentage
|
|
2847
|
+
# The percentage (0-1) discounted from spend in this tier.
|
|
2848
|
+
#
|
|
2849
|
+
# @return [Float]
|
|
2850
|
+
required :percentage, Float
|
|
2851
|
+
|
|
2852
|
+
# @!attribute upper_bound
|
|
2853
|
+
# Inclusive upper bound of cumulative spend; null for the final open-ended tier.
|
|
2854
|
+
#
|
|
2855
|
+
# @return [Float, nil]
|
|
2856
|
+
optional :upper_bound, Float, nil?: true
|
|
2857
|
+
|
|
2858
|
+
# @!method initialize(lower_bound:, percentage:, upper_bound: nil)
|
|
2859
|
+
# @param lower_bound [Float] Exclusive lower bound of cumulative spend for this tier.
|
|
2860
|
+
#
|
|
2861
|
+
# @param percentage [Float] The percentage (0-1) discounted from spend in this tier.
|
|
2862
|
+
#
|
|
2863
|
+
# @param upper_bound [Float, nil] Inclusive upper bound of cumulative spend; null for the final open-ended tier.
|
|
2864
|
+
end
|
|
2865
|
+
|
|
2866
|
+
# If set, the adjustment will apply to every price on the subscription.
|
|
2867
|
+
#
|
|
2868
|
+
# @see Orb::Models::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount#applies_to_all
|
|
2869
|
+
module AppliesToAll
|
|
2870
|
+
extend Orb::Internal::Type::Enum
|
|
2871
|
+
|
|
2872
|
+
TRUE = true
|
|
2873
|
+
|
|
2874
|
+
# @!method self.values
|
|
2875
|
+
# @return [Array<Boolean>]
|
|
2876
|
+
end
|
|
2877
|
+
|
|
2878
|
+
class Filter < Orb::Internal::Type::BaseModel
|
|
2879
|
+
# @!attribute field
|
|
2880
|
+
# The property of the price to filter on.
|
|
2881
|
+
#
|
|
2882
|
+
# @return [Symbol, Orb::Models::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Field]
|
|
2883
|
+
required :field,
|
|
2884
|
+
enum: -> { Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Field }
|
|
2885
|
+
|
|
2886
|
+
# @!attribute operator
|
|
2887
|
+
# Should prices that match the filter be included or excluded.
|
|
2888
|
+
#
|
|
2889
|
+
# @return [Symbol, Orb::Models::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Operator]
|
|
2890
|
+
required :operator,
|
|
2891
|
+
enum: -> { Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Operator }
|
|
2892
|
+
|
|
2893
|
+
# @!attribute values
|
|
2894
|
+
# The IDs or values that match this filter.
|
|
2895
|
+
#
|
|
2896
|
+
# @return [Array<String>]
|
|
2897
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
|
2898
|
+
|
|
2899
|
+
# @!method initialize(field:, operator:, values:)
|
|
2900
|
+
# @param field [Symbol, Orb::Models::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Field] The property of the price to filter on.
|
|
2901
|
+
#
|
|
2902
|
+
# @param operator [Symbol, Orb::Models::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
|
2903
|
+
#
|
|
2904
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
|
2905
|
+
|
|
2906
|
+
# The property of the price to filter on.
|
|
2907
|
+
#
|
|
2908
|
+
# @see Orb::Models::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter#field
|
|
2909
|
+
module Field
|
|
2910
|
+
extend Orb::Internal::Type::Enum
|
|
2911
|
+
|
|
2912
|
+
PRICE_ID = :price_id
|
|
2913
|
+
ITEM_ID = :item_id
|
|
2914
|
+
PRICE_TYPE = :price_type
|
|
2915
|
+
CURRENCY = :currency
|
|
2916
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
|
2917
|
+
|
|
2918
|
+
# @!method self.values
|
|
2919
|
+
# @return [Array<Symbol>]
|
|
2920
|
+
end
|
|
2921
|
+
|
|
2922
|
+
# Should prices that match the filter be included or excluded.
|
|
2923
|
+
#
|
|
2924
|
+
# @see Orb::Models::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter#operator
|
|
2925
|
+
module Operator
|
|
2926
|
+
extend Orb::Internal::Type::Enum
|
|
2927
|
+
|
|
2928
|
+
INCLUDES = :includes
|
|
2929
|
+
EXCLUDES = :excludes
|
|
2930
|
+
|
|
2931
|
+
# @!method self.values
|
|
2932
|
+
# @return [Array<Symbol>]
|
|
2933
|
+
end
|
|
2934
|
+
end
|
|
2935
|
+
|
|
2936
|
+
# If set, only prices of the specified type will have the adjustment applied.
|
|
2937
|
+
#
|
|
2938
|
+
# @see Orb::Models::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount#price_type
|
|
2939
|
+
module PriceType
|
|
2940
|
+
extend Orb::Internal::Type::Enum
|
|
2941
|
+
|
|
2942
|
+
USAGE = :usage
|
|
2943
|
+
FIXED_IN_ADVANCE = :fixed_in_advance
|
|
2944
|
+
FIXED_IN_ARREARS = :fixed_in_arrears
|
|
2945
|
+
FIXED = :fixed
|
|
2946
|
+
IN_ARREARS = :in_arrears
|
|
2947
|
+
|
|
2948
|
+
# @!method self.values
|
|
2949
|
+
# @return [Array<Symbol>]
|
|
2950
|
+
end
|
|
2951
|
+
end
|
|
2952
|
+
|
|
1633
2953
|
# @!method self.variants
|
|
1634
|
-
# @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)]
|
|
2954
|
+
# @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum, Orb::Models::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount)]
|
|
1635
2955
|
end
|
|
1636
2956
|
end
|
|
1637
2957
|
|